Skip to content
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

Fix delayed $WMA_DEPLOY_DIR env virable #12167

Merged

Conversation

todor-ivanov
Copy link
Contributor

@todor-ivanov todor-ivanov commented Nov 15, 2024

Fixes #12166

Status

not-tested

Description

Once we've fixed the broken set_cronjob function for the virtual environment here: dmwm/CMSKubernetes#1564 , we immediately started getting e-mail warnings for broken cronjobs of the sort:

/bin/sh: line 1: /bin/manage: No such file or directory

And the reason was that we have used the $WMA_DEPLOY_DIR env. variable in the construction of $WMA_MANAGE_DIR, but we have the initialization of the former delayed, so it ends up as an empty string in the later.
This was resulting in generating the following crontab record:

55 */12 * * * date -Im >> /data/WMAgent.venv3/srv/wmagent/2.3.4/logs/renew-proxy.log && /bin/manage renew-proxy 2>&1 >> /data/WMAgent.venv3/srv/wmagent/2.3.4/logs/renew-proxy.log

With the current PR we fix the delayed initialization of $WMA_DEPLOY_DIR variable. Which fixes the issue and the correctly generated crontab record is as follows:

55 */12 * * * date -Im >> /data/WMAgent.venv3/srv/wmagent/2.3.4/logs/renew-proxy.log && /data/WMAgent.venv3/bin/manage renew-proxy 2>&1 >> /data/WMAgent.venv3/srv/wmagent/2.3.4/logs/renew-proxy.log

Is it backward compatible (if not, which system it affects?)

YES

Related PRs

dmwm/CMSKubernetes#1564

External dependencies / deployment changes

No

@dmwm-bot
Copy link

Jenkins results:

  • Python3 Unit tests: succeeded
    • 2 tests no longer failing
    • 2 changes in unstable tests
  • Python3 Pylint check: succeeded
  • Pycodestyle check: succeeded

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/WMCore-PR-Report/84/artifact/artifacts/PullRequestReport.html

Copy link
Contributor

@amaltaro amaltaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking your PR description and the confirmation that it works as expected, it looks good to me as well. Thanks Todor.

@amaltaro amaltaro merged commit 90a14e5 into dmwm:master Nov 26, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup of cron jobs fail during initialization of the agent
4 participants