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

Revised changes for mode 3 cvmfsexec support #372

Open
wants to merge 12 commits into
base: branch_v3_11
Choose a base branch
from

Conversation

namrathaurs
Copy link
Contributor

@namrathaurs namrathaurs commented Nov 3, 2023

This PR brings in changes corresponding to the comments received on PR #245. Since there was a significant number of comments on that PR, it would have been difficult to retain the comments while making the necessary changes. So the suggestion received was to create a new PR that contains the suggested changes (in accordance with the comments received) while the comments are retained for looking back into during the process of editing the files.

NOTE: This PR supersedes #245.

Sub-tasks that close this PR:

@namrathaurs namrathaurs self-assigned this Dec 26, 2023
@namrathaurs namrathaurs added this to the 3.11 milestone Feb 2, 2024
@namrathaurs namrathaurs added the rel:3.11.0 Release label for v3.11.0 label Feb 7, 2024
@namrathaurs namrathaurs force-pushed the branch_v3_11_revised branch 2 times, most recently from 92f0336 to c39a07e Compare March 25, 2024 20:03
@namrathaurs namrathaurs marked this pull request as ready for review March 25, 2024 22:11
creation/lib/cgWConsts.py Outdated Show resolved Hide resolved
creation/lib/cgWDictFile.py Outdated Show resolved Hide resolved
creation/lib/cgWParamDict.py Show resolved Hide resolved
creation/lib/cgWConsts.py Show resolved Hide resolved
creation/web_base/cvmfs_helper_funcs.sh Outdated Show resolved Hide resolved
creation/web_base/glidein_startup.sh Outdated Show resolved Hide resolved
creation/web_base/glidein_startup.sh Outdated Show resolved Hide resolved
creation/web_base/glidein_startup.sh Outdated Show resolved Hide resolved
creation/web_base/glidein_startup.sh Outdated Show resolved Hide resolved
creation/web_base/glidein_startup.sh Show resolved Hide resolved
namrathaurs and others added 9 commits May 21, 2024 18:23
- also updated syntax for the condition in the helper script
- complete refactoring of code based on improved logic and better flow handling in exception cases
- changed cvmfs-related helper scripts to always be downloaded regardless of whether CVMFS will be mounted or not
- added documentation for the helper methods used towards the goal of mounting CVMFS on demand
- updated the unmount logic based on the refactored code
- minor changes (formatting, indentation, improved user facing messages etc.)
- improvements to the existing unmounting process now that mode 3 will
  also be supported
- code refactoring in cvmfs_setup script for better flow and readability
- improvements in cvmfs_helper_funcs to allow for different behaviors as
  a result of using cvmfsexec modes
- fixed a runtime error when concatenating a set with only one element
- added a hyperlink reference to the existing section that outlines the variables related to the on-demand CVMFS provisioning feature
- updated name of the variable (GLIDEIN_WORK_DIR) to specify its usage being internal to
  GWMS
- added `export` command to explicitly export the value of PATH when a
  glidein is reinvoked. This was done to resolve the `pivot_root:
command not found` error
@namrathaurs namrathaurs requested a review from mambelli June 3, 2024 14:05
@@ -219,15 +221,26 @@ def populate(self, other=None):
self.dicts["params"].add("GLIDEIN_Factory_Collector", str(factory_monitoring_collector))
populate_gridmap(self.conf, self.dicts["gridmap"])

# the following list will be a megalist containing all the scripts; used for duplication check logic subsequently
all_scripts = list()
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest using all_scripts = [] for style consistency.

@@ -397,7 +408,7 @@ def populate(self, other=None):
# TODO: This check could be done in the XML, checking if the entries are consistent in the current version
# fetch the on-demand cvmfs provisioning feature setting
# if on-demand CVMFS not used at the global level; ignore and continue
ondemand_cvmfs = self.dicts["attrs"].get("GLIDEIN_USE_CVMFSEXEC", 0)
ondemand_cvmfs = self.dicts["attrs"].get("GLIDEIN_USE_CVMFS", 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also check for GLIDEIN_USE_CVMFSEXEC for backward compatibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The configuration knob GLIDEIN_USE_CVMFSEXEC will be changed to GLIDEIN_USE_CVMFS, but I do not know for sure if we need to ensure backward compatibility in this case, if this change will eventually be propagated to production.

@mambelli would like to know your thoughts on this!

@@ -716,7 +733,7 @@ def populate(self, entry, schedd, main_dicts):
# TODO: This check could be done in the XML, checking if the entries are consistent in the current version
# fetch the on-demand cvmfs provisioning feature setting
# if on-demand CVMFS not used by entry, ignore and continue
ondemand_cvmfs = self.dicts["attrs"].get("GLIDEIN_USE_CVMFSEXEC", 0)
ondemand_cvmfs = self.dicts["attrs"].get("GLIDEIN_USE_CVMFS", 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also check for GLIDEIN_USE_CVMFSEXEC for backward compatibility?

Comment on lines 33 to +34
GWMS_STARTUP_SCRIPT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
export GWMS_STARTUP_SCRIPT=${GWMS_STARTUP_SCRIPT} # for glidein reinvocation
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't we declare and export GWMS_STARTUP_SCRIPT in one line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a good suggestion. The export statement was something I added as part of my changes and it did not occur to me that declaring and exporting could be done in one line.

BrunoCoimbra
BrunoCoimbra previously approved these changes Aug 23, 2024
Copy link
Contributor

@BrunoCoimbra BrunoCoimbra left a comment

Choose a reason for hiding this comment

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

I made a couple of suggestions, but the code looks good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rel:3.11.0 Release label for v3.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants