-
Notifications
You must be signed in to change notification settings - Fork 33
Fetch RSE info from Rucio and save to a file #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ericvaandering
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a good start for a draft PR
|
|
||
| returns a dict of settings and attributes | ||
| ''' | ||
| rseinfo = client.get_rse(rse=rse) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
res_info
usage and limits are unused, right?
|
|
||
| def set_rse_settings(rse: str, config: dict, dry_run: bool = True): | ||
| ''' | ||
| Setts RSE settings and attributes from a config dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sets
| current_settings, current_attrs = get_info_from_rucio(rse) | ||
|
|
||
| # update settings | ||
| # TODO: Handle KeyError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
| except Duplicate: | ||
| print(f'{attribute} already exists') | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Settings is still coming?
|
@Panos512 @ericvaandering @haozturk I made some updates. Currently, I don't have permission to directly commit to a SITECONF project (currently using T2_US_Nebraska). To test the initial upload script, I forked the SITECONF project and then ran my script to commit to it. Details here: https://gitlab.cern.ch/SITECONF/T2_US_Nebraska/-/merge_requests/1 I am also updating CMSRSE.py and the setRucioFromGitlab to read from the SITECONF//rucio directory for RSE settings and attributes. One thought I have is to include the last commit id for a config and set that as an RSE attribute: CMSRucio/docker/rucio_client/scripts/setRucioFromGitlab Lines 89 to 92 in f86e809
We could use this to keep track of the current RSE configuration. I was also thinking we could include another attribute to keep track of which storage.json is currently applied to an RSE.
Would this be a good idea? |
Would close #770
Currently in progress.
The script can first fetch RSE settings and attributes from Rucio. Will have to use the RSEClient to update settings with
update_rseand attributes withdelete_rse_attributeand thenadd_rse_attribute.The json looks like this:
{ "settings": { "setting1": "1", "setting2": "2", }, "attributes": { "attribute1": "1", "attribute2": "2" } }The question is where should we store the settings file. As with consistency checker and protocols, we could also use SITECONF in the CERN Gitlab instance.