fix(delivery): use podman unshare for rootless volume population#276
Closed
skevetter wants to merge 2 commits into
Closed
fix(delivery): use podman unshare for rootless volume population#276skevetter wants to merge 2 commits into
skevetter wants to merge 2 commits into
Conversation
populateVolumeDirectCopy writes directly to the volume mountpoint path
from `volume inspect`. Under rootless Podman, this path is inside a user
namespace and not accessible from the host filesystem, causing WriteFile
to fail.
Detect rootless Podman via `podman info --format {{.Host.Security.Rootless}}`
and route to a new populateVolumeUnshare method that pipes the binary
through `podman unshare sh -c 'cat > <path> && chmod 755 <path>'` to
write within the correct namespace. Docker path is unchanged.
Route populateVolumeUnshare through d.cmd() instead of raw exec.CommandContext to stay consistent with all other methods and inherit environment handling. Pass destPath as a positional argument to the shell script to prevent breakage from special characters in volume mountpoint paths.
✅ Deploy Preview for devsydev canceled.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Author
|
Closing: DEVSY-091 already merged via PR #275 (v3's branch). Duplicate PR. |
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.
Summary
isPodman()+isRootlessPodman()(checkspodman info --format {{.Host.Security.Rootless}})podman unshare sh -c '...'to enter the user namespace, where the volume mountpoint is accessibleos.WriteFile