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

Avoid invocation of cvmfsexec distros building if not necessary #309

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

mmascher
Copy link
Contributor

@mmascher mmascher commented Jun 22, 2023

As identified in #308, this PR brings in a change to the existing use of subprocess module (via the GWMS subprocessSupport module) for efficiency purposes.

Currently, the subprocessSupport module is used to execute /usr/bin/create_cvmfsexec_distros.sh always, regardless of whether cvmfsexec distributions are required to be built or rebuilt. If CVMFS is not needed and the cvmfsexec_distro tag is not defined in the factory configuration (disabled mode), then calling subprocessSupport to execute the script is basically unnecessary. Additionally, since subprocess spawns a new process to execute the script, this might result in a memory-intensive operation in a production setting.

modified the description of the change corresponding to PR309
@namrathaurs namrathaurs linked an issue Jun 30, 2023 that may be closed by this pull request
@namrathaurs namrathaurs changed the title Do not for call cvmfsexec script if not necessary. Fixes #308 Avoid invocation of cvmfsexec distros building if not necessary Jun 30, 2023
- refactored the suggested change to use the existing if condition
- added a message to inform the user about the (re)building of cvmfsexec distributions when disabled rather than just the existing warning info
@namrathaurs
Copy link
Contributor

@mmascher Upon reviewing this PR, I realized that the suggestion you made to cgWParamDict.py can be modified such that the invocation of /usr/bin/create_cvmfsexec_distros.sh can be added to the existing if cfgs: condition, which is right after the lines corresponding to the invocation of subprocessSupport.iexe_cmd, instead of adding an extra if condition. I modified accordingly and added a message to inform the user about the building/rebuilding being disabled since that was previously being handled inside the create_cvmfsexec_distros.sh script. I also modified the description you had originally added to the list of Bug Fixes in the CHANGELOG file.

Thanks for catching this as well as sharing your suggestions for improvement!

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.

Added a few modifications to the suggested changes and the PR is ready for merging!

@namrathaurs namrathaurs merged commit ea64c74 into glideinWMS:master Jun 30, 2023
8 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.

Do not for call cvmfsexec script if not necessary
2 participants