-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[v4.1] [BZ #2083997] pod: build pause image in custom user NS #14280
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
Conversation
Use the host UID and host GID mapping when building the local pause image for a Pod with a custom mapping. Otherwise, the mappings are off and the build fails. Propagating the mapping to the build container is not needed since the pause image ships merely a copied `catatonit` from the host. Backport-of: commit c45d518 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2083997 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
edsantiago
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs tests
| # Remove the pod and the pause image | ||
| run_podman pod rm $random_pod_name | ||
| run_podman version --format "{{.Server.Version}}-{{.Server.Built}}" | ||
| run_podman rmi -f localhost/podman-pause:$output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just do rmi -f $(pause_image) ?
| skip_if_rootless "does not work rootless - rootful feature" | ||
| skip_if_remote "remote --uidmap is broken (see #14233)" | ||
| random_pod_name=$(random_string 30) | ||
| run_podman pod create --uidmap 0:200000:5000 --name=$random_pod_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no test here. This test passes on main, which means you're not actually testing anything. Could you please add something that actually tests your new functionality (and which fails when run against main)? And can you add a comment describing something like "prior to #14280 this would fail with blah-blah-error" ?
[EDIT: what I mean is, it isn't clear if it's the "pod create" that you think would fail, or the "start", or if you accidentally a different step]
[EDIT 2: Sigh, never mind, I just noticed the v4.1. Test fails on v4.1 with
Error: error starting container e6696ef28b7428ab9009ff6c76c1977e0468ba5195e4d21e884e5306b7541965: crun: executable file `/catatonit` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
I would still appreciate a comment indicating that it's the start that would fail without this PR]
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
Use the host UID and host GID mapping when building the local pause
image for a Pod with a custom mapping. Otherwise, the mappings are off
and the build fails. Propagating the mapping to the build container is
not needed since the pause image ships merely a copied
catatonitfromthe host.
Backport-of: commit c45d518
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2083997
Signed-off-by: Valentin Rothberg vrothberg@redhat.com
Does this PR introduce a user-facing change?
@mheon @rhatdan @TomSweeneyRedHat PTAL