Skip to content

Commit

Permalink
addressing the remaining PR review comments
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
namrathaurs committed May 31, 2024
1 parent c81d55a commit bd2fbdf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion creation/lib/cgWDictFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def refresh_file_list(dicts, is_main, files_set_readonly=True, files_reset_chang
# dictionaries must have been written to disk before using this
def refresh_signature(dicts): # update in place
signature_dict = dicts["signature"]
for k in ("consts", "vars", "untar_cfg", "gridmap") + cgWConsts.FILE_LISTS_PRIORITIES + ("description"):
for k in ("consts", "vars", "untar_cfg", "gridmap") + cgWConsts.FILE_LISTS_PRIORITIES + ("description",):
if k in dicts:
signature_dict.add_from_file(dicts[k].get_filepath(), allow_overwrite=True)
# add signatures of all the files linked in the lists
Expand Down
3 changes: 2 additions & 1 deletion creation/web_base/cvmfs_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ if [[ $? -eq 0 ]]; then
export GLIDEIN_WORKSPACE=$original_workspace
export GWMS_CVMFS_REEXEC=$gwms_cvmfs_reexec
export GWMS_CVMFSEXEC_MODE=$cvmfsexec_mode
export GLIDEIN_WORK_DIR="$work_dir"
export GWMS_GLIDEIN_WORK_DIR="$work_dir"
export GLIDEIN_CVMFS_CONFIG_REPO="$GLIDEIN_CVMFS_CONFIG_REPO"
export GLIDEIN_CVMFS_REPOS="$GLIDEIN_CVMFS_REPOS"
export PATH=$PATH
echo "Reinvoking glidein now..."
exec "$glidein_cvmfsexec_dir"/"$dist_file" -- "$GWMS_STARTUP_SCRIPT"
echo "!!WARNING!! Outside of reinvocation of glidein_startup"
Expand Down
6 changes: 1 addition & 5 deletions creation/web_base/glidein_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ IFS=$' \t\n'
# Some sites empty PATH. Setting a reasonable default
if [[ -z "$PATH" ]]; then
export PATH="/bin:/usr/bin"
elif [[ -z "$gwms_cvmfs_reexec" ]]; then
export PATH="/usr/sbin:$PATH"
fi

global_args="$*"
Expand Down Expand Up @@ -1676,7 +1674,7 @@ else
fi
fi
work_dir_created=1
export GWMS_GLIDEIN_WORK_DIR=${GLIDEIN_WORK_DIR} # for glidein reinvocation
export GWMS_GLIDEIN_WORK_DIR=${work_dir} # for glidein reinvocation

# GWMS_SUBDIR defined on top
GWMS_DIR="${work_dir}/$GWMS_SUBDIR"
Expand Down Expand Up @@ -2068,8 +2066,6 @@ if [[ -n "$gwms_cvmfs_reexec" && "$gwms_cvmfs_reexec" == "yes" ]]; then
# re-sourcing the helper script inside of cvmfsexec environment
. "$work_dir"/cvmfs_helper_funcs.sh
mount_cvmfs_repos $gwms_cvmfsexec_mode $cvmfs_config_repo $cvmfs_add_repos
# check if the cvmfs repos are still mounted inside of reinvocation
df -h

# re-source all the scripts as it'd have been done during the first invocation of this script
extract_all_data
Expand Down
1 change: 1 addition & 0 deletions doc/factory/custom_vars.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ <h3>Custom HTCondor Variables</h3>
<li><a href="#admin_vars">Admin variables</a></li>
<li><a href="#dyn_vars">Dynamic variables </a></li>
<li><a href="#singularity_vars">Singularity variables </a></li>
<li><a href="#cvmfs_vars">CVMFS variables </a></li>
<li>
<a href="#cpuscalculation">Set and discover available CPUs</a>
</li>
Expand Down

0 comments on commit bd2fbdf

Please sign in to comment.