-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add token authentication support #12196
Conversation
Jenkins results:
|
Jenkins results:
|
Jenkins results:
|
retest this please |
Jenkins results:
|
I tested the stage-in with the following workflow: The The wmAgent logfiles show the CMSSW run executed successfully and stageOut/dqmUpload failed afterwards. E.g.:
job2:
|
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.
Kenyi, Andrea, it is not clear to me if this is a test and/or development in progress or not. I suspect you are still working on this, so I am labeling this according to make it clear and avoid mistakes (please remove the label once it's ready for a final review/merge).
In addition, please let me know if you wanted me to look into anything specific. I do not have anything else to add here and changes are looking alright.
@amaltaro This has been tested for stage-in and it is working. However, it depends on condor to be properly setup, otherwise condor will still submit but they will fail with:
Therefore, code review is fine, but we cannot merge until the condor setup is fully defined (as far as I know, there is some automation related development going on regarding this) and deployed in all condor schedds. |
Jenkins results:
|
Jenkins results:
|
I opened a ticket with SI to ask them to install on our schedds what we need to move forward [1] [1] https://its.cern.ch/jira/projects/CMSSI/issues/CMSSI-122 |
Thank you @mapellidario ! |
Jenkins results:
|
Jenkins results:
|
Update: Token support is disabled by default. When enabled, it shows the following in the main log:
|
@d-ylee Can you remind me where and when the WMAgent config is copied from in the jenkins setup? I added one line in the config. This comes from: In Jenkins, I see we create the config directory at some point: but I'm not sure if we pick the config from In short, do you remember if we propagate changes from the |
Jenkins results:
|
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.
@khurtado, sounds great, thank you! May you report also here that your tests were successful?
@anpicci Yes! The option in the agent to enable/disable the token functionality is working as expected. I tested with a couple of worklows in testbed. |
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.
@khurtado thank you for providing these changes. They are looking good to me, however can you please:
- if you agree, update that 1 line comment I made
- squash these commits accordingly
?
Thanks!
etc/submit_py3.sh
Outdated
# exit 1106 | ||
fi | ||
else | ||
echo "No condor auth/token credentials directory found." |
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.
How about being more explicit and saying something like "Variable _CONDOR_CREDS is not defined and no condor auth..."?
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.
Done!
3efbb9f
to
7d1d3c7
Compare
Sounds good, I just updated that line to be more explicit and squashed the commits. |
Jenkins results:
|
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.
Great, thanks Kenyi. It all looks good now.
Fixes #12199
Needed for #12144
Status
tested and working
But external dependency is not completed (condor). Therefore, this functionality is disabled by default.
Description
This does not completely fixes #12144
This is needed to enable token authentication in WMAgent.
Stage-in should be functional with this fix
Stage-out will require changes in the stageout commands
Functionality is disabled by default (until condor setup of tokens is uniform in all schedds)
Is it backward compatible (if not, which system it affects?)
YES
Related PRs
None
External dependencies / deployment changes
HTCondor token setup
htgettoken (optional) in the CMS runtime image.
Note: The HTCondor token setup is not deployed in all schedds yet.
Additional notes
There is a variable called $BEARER_TOKEN_FILE that if set, HTCondor will write the token there.
This would need to be setup in the host, not the WMAgent container.
This step is however, not critical because this is the reference token.
The actual token that HTCondor transfers comes from
which is in a private system area.
This can be changed in the condor configuration to directly write to
/data/certs
in the future.When jobs are submitted via the condor python bindings, inside the WMAgent container, the job is submitted, but /usr/bin/condor_vault_storer does not seem to be triggered.
I am currently working that around by:
Executing a condor_submit with a test job once from the host
Token seems to stay and refresh afterwards
If cms_readonly scope is used, this does not happen and we need a manual refresh, but for production, we don't need any scope.