-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
This python package allows syncing of SLURM accounts with LDAP accounts. | ||
# jasmin-slurm-sync | ||
This python utility is used by [JASMIN](https://jasmin.ac.uk) to keep [SLURM Accounts](https://slurm.schedmd.com/sacctmgr.html#OPT_account) in sync with users' LDAP tags. | ||
|
||
It gets a list of ldap tags for each user from LDAP then converts that list to SLURM accounts using the mapping provided in config.toml. | ||
It then gets a list of current SLURM accounts for the user using [sacctmgr](https://slurm.schedmd.com/sacctmgr.html) and compares the two sets. | ||
Then it runs the correct [sacctmgr](https://slurm.schedmd.com/sacctmgr.html) commands to add or remove the user from accounts to make the sets equal. | ||
|
||
When running in daemon mode, it does this for every user then sleeps for an amount of time specified in config.toml, before running again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
ldap_server_addr = "" | ||
ldap_search_base = "" | ||
ldap_search_filter = "" | ||
ldap_server_addr = "" # The address of your ldap server. | ||
ldap_search_base = "" # The search base for ldap. | ||
ldap_search_filter = "" # A filter to apply to the search. | ||
|
||
required_slurm_accounts = [""] | ||
required_slurm_accounts = [""] # SLURM accounts (as mapped by ldap_tag_mapping) which are required before user is synced. | ||
|
||
daemon_sleep_time = 300 | ||
daemon_sleep_time = 300 # Time between syncs when in daemon mode. | ||
|
||
# A map of ldap tags to slurm accounts. | ||
# An ldap tag can manage multiple slurm accounts | ||
# But a slurm account can't be associated with multiple ldap tags, | ||
# this will cause unxpected behaviour. | ||
[ldap_tag_mapping] | ||
"" = [""] |