tokens - added feature flag OAUTH_CMS_TOKEN_NAME in WMAgent.secrets#12428
Open
mapellidario wants to merge 4 commits intodmwm:masterfrom
Open
tokens - added feature flag OAUTH_CMS_TOKEN_NAME in WMAgent.secrets#12428mapellidario wants to merge 4 commits intodmwm:masterfrom
mapellidario wants to merge 4 commits intodmwm:masterfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Open
1 task
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
|
Additional logic needs to be implemented.
we could add four configuration parameters in config.py with lists of regexs. It's not clear to me if we want to check this at job submission level or at WQE level. see discussion at https://its.cern.ch/jira/projects/CMSSI/issues/CMSSI-124?filter=allissues |
Contributor
|
As discussed with Kenyi and Andrea, we agreed on the following steps (on top of Dario's comment above):
|
|
There are two cases of (un)available token support to distinguish:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
related to #12228
Status
not tested
Description
It is straightforward to enable the use of tokens in remote jobs, it is enough to add the following classad to the jobs jdl
However, It is not trivial to decide when it is safe to enable this feature. For example, if the file
/var/lib/condor/oauth_credentials/cmst1/cms_wmagent.usedoes not exist in the wmagent VM, than condor_submit fails.We could use the condor cli or python bindings to check if a token is present [1], but these interfaces are likely to change in the future, see [2]. We need a solution that is tested, stable and reliable for years to come.After a quick chat with Alan, I propose to use a feature flag to enable this. This would allow not to rely on any additional condor interface, we would just trust that every WMAgent is equipped with a proper token. This simplicity comes at the expense of manual intervention from operators in order to disable tokens in case of infrastructure malfunctions.I decided not to use a true/false feature flag because I want the application to be ready in case of another token name change.(edit) I had another chat with Alan. We agreed that:
/usr/sbin/condor_store_credin thewmagent-docker-run.shscript. if the token is not valid, then the wmagent is not initializedhow to operate the agent after this PR is merged
enable
enable the feature adding the following to WMagent.secrets, then init the agent
If you can not initialize an agent, then change
/data/dockerMount/srv/wmagent/current/config/config.pyas follows and restart the agentdisable
We do not support starting an agent without a valid token
Change
/data/dockerMount/srv/wmagent/current/config/config.pyas follows and restart the agentIs it backward compatible (if not, which system it affects?)
yes. if the WMAgent.secrets file is not touched, then the value from
etc/WMAgentConfig.pyis used, which disables the use of tokensRelated PRs
PR for CMSKubernetes: dmwm/CMSKubernetes#1642
External dependencies / deployment changes
nope :)
[1] condor cli
condor python bindings v24.0 with AP running 24.0
[2] https://its.cern.ch/jira/browse/CMSSI-124?focusedId=7068943&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-7068943
After extensive tests, I noticed that this area of condor is still under development and features are still added and polished. For example the new python bindings
htcondor2introduce new functions wrthtcondor. the bindings for 24.0 do not match the documentations. the bindingshtcondor2for 24.X are not compatible with 24.0, etc etc.[3]
used wf
dmapelli_SC_ProdPsi_test_tokens_v2_250822_181225_919on test11 and vocms0262wf completed ok
[4]
edit config.py
restart JobSubmitter, job content seem ok