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

Properly run restartComponent.sh avoiding hardwired paths #12185

Merged

Conversation

todor-ivanov
Copy link
Contributor

Fixes #12184

Status

ready

Description

With the current change we avoid hardwired paths inside the restartComponent.sh script, and instead we properly tie those as relative paths to the proper environment $WMA_* variables.

In addition we add the executable flag to the script and change its shell from sh to bash, in order to be correctly run and later quit in case of errors from the cronjobs of the agents, instead of being sourced and the errors silently ignored if the script just quits (exit $errCode inside a sourced script will just close the shell sourcing the script leaving no trace of the error code returned).

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

YES

Related PRs

This PR goes hand in hand with: dmwm/CMSKubernetes#1569

External dependencies / deployment changes

The WMAgent packages uploaded to Pypi.
Since the restartComponent.sh script is always run by our cronjobs from $WMA_DEPLOY_DIR/deploy/ it will always be the version of the script coming from the WMAgent pypi package which is to be executed, regardless if one runs the service from source or from the pypi packages. So even if the fix is applied and patched the change won't take effect until the newly built python package is redeployed at the destination or eventually the script substituted manually.

@dmwm-bot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 1 new failures
    • 3 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/109/artifact/artifacts/PullRequestReport.html

@todor-ivanov
Copy link
Contributor Author

thanks @vkuznet

@todor-ivanov todor-ivanov merged commit 83c08ff into dmwm:master Nov 27, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WMAgent - cronjobs spam
3 participants