fix bind mount bug when using proxy#149
Merged
casparvl merged 2 commits intoEESSI:mainfrom Jan 27, 2026
Merged
Conversation
casparvl
approved these changes
Jan 27, 2026
Contributor
casparvl
left a comment
There was a problem hiding this comment.
Tested here casparvl/software-layer#6 (comment) (even though I didn't have an issue with the same target being specified twice - at least it doesn't break any existing behavior). Looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a proxy is used to provide access to CernVM-FS on a compute node, we add the proxy configuration to
/etc/cvmfs/default.local. The current code checked if this directory was already listed in the$BIND_PATHS, and exited if so.However, exiting is too strict. We only should exit if the source of the existing bind mount with destination
/etc/cvmfs/default.localis different to the currently changed source (where we're adding the proxy settings). If the sources are the same (we verify viareadlink -f), we don't need to add the bind mount to$BIND_PATHSagain (all is fine).This PR adds the function
check_bind_paths_for_targetthat checks whether a givensrc:targetbind mount is already in$BIND_PATHS. This function is then used to decide whether the given bind mount has to be added or not OR if an ambiguous situation has occurred (different sources for same target) and thuseessi_container.shshall terminate immediately.Code was tested in trz42/software-layer#93 via https://github.com/trz42/software-layer-scripts/tree/debug_bind_mount_issue