Skip to content

Protect processing of custom scripts in glidein_startup against stdin interference #498

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

Merged
merged 5 commits into from
Mar 19, 2025

Conversation

mambelli
Copy link
Contributor

@mambelli mambelli commented Mar 13, 2025

As reported in Issue #500 , on a specific site the parsing of the client custom scripts list was stopping after a specific file and continuing with the next list.
This PR fixes #500 :

  • redirects the stdin of custom scripts to /dev/null to avoid to interfere with glidein_startup.sh stdin
  • adds a check to report a warning in case of similar problems

The last commit is the fix for production

This PR includes also older commits with modified versions used in troubleshooting (debug messages). To keep them in the history.
Consider a squash-merge to exclude them from the master branch history.

@mambelli mambelli force-pushed the v310/file_fetch_troubleshoot branch from 1c3b9bc to 09cfe1a Compare March 13, 2025 21:22
@mambelli
Copy link
Contributor Author

mambelli commented Mar 13, 2025

To help troubleshoot:

  1. replace glidein_startup.sh in /var/lib/gwms-factory/web-base/ with the copy in this PR (direct link to the raw file: https://raw.githubusercontent.com/glideinWMS/glideinwms/09cfe1a9db2b0ac4decb9b992334c7b554384d32/creation/web_base/glidein_startup.sh).
  2. Then run a factory upgrade (reconfig is insufficient)

This will add about 20+2*N_of_downloads lines to the glidein stderr

@mambelli
Copy link
Contributor Author

mambelli commented Mar 14, 2025

New version (3). Added a wrapper in the read loop parsing the files to get more troubleshooting info: https://raw.githubusercontent.com/glideinWMS/glideinwms/9642ae5dc1828ddd04b677f40611fc2d8f2f1992/creation/web_base/glidein_startup.sh

@mambelli mambelli requested a review from namrathaurs March 18, 2025 19:38
@mambelli mambelli marked this pull request as ready for review March 18, 2025 20:29
@mambelli mambelli changed the title V310/file fetch troubleshoot Protect parsing of custom scripts in glidein_startup against stdin interference Mar 18, 2025
@mambelli mambelli changed the title Protect parsing of custom scripts in glidein_startup against stdin interference Protect processing of custom scripts in glidein_startup against stdin interference Mar 18, 2025
@mambelli mambelli force-pushed the v310/file_fetch_troubleshoot branch from a38d003 to cf01acc Compare March 18, 2025 20:37
@mambelli
Copy link
Contributor Author

This fix will go in GlideinWMS (Factory) v 3.10.11 and v 3.11.1
To apply this fix you can patch any Factory (no changes for the Frontend) v 3.10.10 and 3.11.0.

  1. replace glidein_startup.sh in /var/lib/gwms-factory/web-base/ with the copy in this PR (direct link: https://raw.githubusercontent.com/mambelli/glideinwms/refs/heads/v310/file_fetch_troubleshoot/creation/web_base/glidein_startup.sh) and
  2. run a factory upgrade (reconfig is insufficient)

Copy link
Contributor

@namrathaurs namrathaurs left a comment

Choose a reason for hiding this comment

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

Changes look good and can be merged!

@mambelli mambelli merged commit 3a64428 into glideinWMS:master Mar 19, 2025
9 checks passed
@mambelli mambelli mentioned this pull request Mar 23, 2025
10 tasks
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.

Not all custom scripts in list are executed
2 participants