-
Notifications
You must be signed in to change notification settings - Fork 33
Add PoC creation for _User sites #1035
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
Open
dciangot
wants to merge
3
commits into
dmwm:master
Choose a base branch
from
dciangot:create_rome_user_rse
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+110
−57
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -14,8 +14,11 @@ from CMSRSE import CMSRSE | |
|
|
||
| SKIP_SITES = [] | ||
|
|
||
| # PoC hardcoded list of RSE names for which _User variants should be created | ||
| USER_TIER_POC_SITES = ['T2_IT_Rome'] | ||
|
|
||
| parser = ArgumentParser(description="Update a site definition from GitLab") | ||
| parser.add_argument('--type', dest='cms_type', help='type of RSE (prod-real, int-real, test, temp).', | ||
| parser.add_argument('--type', dest='cms_type', help='type of RSE (prod-real, int-real, test, temp, user).', | ||
| default=None, required=True) | ||
| parser.add_argument('--dryrun', dest='dry_run', action='store_true', | ||
| help='do not change anything in rucio, checking only') | ||
|
|
@@ -59,7 +62,7 @@ for project in projects: | |
| continue | ||
| print(f'Checking {site["rse"]} and type {options.cms_type}') | ||
| if site['rse'] and options.cms_type in ['test', 'temp']: | ||
| # For these, query the actual site and construct a JSON | ||
| # For test and temp types, apply to all RSEs | ||
| if options.cms_type == 'test': | ||
| rse_name = site['rse'] + '_Test' | ||
| deterministic = True | ||
|
|
@@ -70,8 +73,28 @@ for project in projects: | |
| print(' Skipping.') | ||
| continue | ||
|
|
||
| if 'fts' not in site: | ||
| site.update({'fts': ["https://fts3-cms.cern.ch:8446", "https://lcgfts3.gridpp.rl.ac.uk:8446"]}) | ||
| rse = CMSRSE(site, dry=options.dry_run, cms_type=options.cms_type, deterministic=deterministic) | ||
| try: | ||
| if rse.update(): | ||
| print(f'RSE {rse.rse_name} and type {rse.rucio_rse_type} changed') | ||
| else: | ||
| print(f'RSE {rse.rse_name} and type {rse.rucio_rse_type} unchanged') | ||
| except Exception: | ||
| print(f'Could not update RSE {rse.rse_name}. Traceback:') | ||
| print(traceback.format_exc()) | ||
| elif site['rse'] and options.cms_type == 'user': | ||
| # For user type, only create _User variants for PoC sites | ||
| if site['rse'] not in USER_TIER_POC_SITES: | ||
| print(f' Skipping (not in PoC list: {USER_TIER_POC_SITES})') | ||
| continue | ||
| # For these, query the actual site and construct a JSON | ||
| rse_name = site['rse'] + '_User' | ||
| deterministic = True | ||
| # Allow PoC _User RSEs to be created even if not yet in Rucio | ||
| if rse_name in SKIP_SITES: | ||
| print(' Skipping.') | ||
| continue | ||
|
Comment on lines
+91
to
+96
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sounds valid too, like a catch-22 |
||
|
|
||
| rse = CMSRSE(site, dry=options.dry_run, cms_type=options.cms_type, deterministic=deterministic) | ||
| try: | ||
| if rse.update(): | ||
|
Comment on lines
98
to
100
|
||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@dciangot Isn't this a valid comment. We should set a default FTS if there is nothing there?