Skip to content

fix bind mount bug when using proxy#149

Merged
casparvl merged 2 commits intoEESSI:mainfrom
trz42:fix_bind_mount_bug_when_using_proxy
Jan 27, 2026
Merged

fix bind mount bug when using proxy#149
casparvl merged 2 commits intoEESSI:mainfrom
trz42:fix_bind_mount_bug_when_using_proxy

Conversation

@trz42
Copy link
Contributor

@trz42 trz42 commented Jan 24, 2026

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.local is different to the currently changed source (where we're adding the proxy settings). If the sources are the same (we verify via readlink -f), we don't need to add the bind mount to $BIND_PATHS again (all is fine).

This PR adds the function check_bind_paths_for_target that checks whether a given src:target bind 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 thus eessi_container.sh shall terminate immediately.

Code was tested in trz42/software-layer#93 via https://github.com/trz42/software-layer-scripts/tree/debug_bind_mount_issue

@trz42 trz42 added the bug Something isn't working label Jan 24, 2026
@casparvl casparvl self-requested a review January 27, 2026 10:46
Copy link
Contributor

@casparvl casparvl left a comment

Choose a reason for hiding this comment

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

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.

@casparvl casparvl merged commit c6a57dc into EESSI:main Jan 27, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants