You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In OCP 4, starting with buildah:v1.32.2, buildah bud command fails its execution when secret etc-pki-entitlement is mounted on /etc/pki/entitlement#5800
Open
gmeghnag opened this issue
Oct 29, 2024
· 3 comments
In OCP 4 when I execute a buildah pod running quay.io/buildah/stable:v1.32.2 (or upper version) and mounting etc-pki-entitlement as a secret the pod fails its execution with the following error:
time="2024-10-29T13:55:57Z" level=warning msg="pkg/bind: error removing \"/var/tmp/buildah3386043866/mnt\": directory not empty"
time="2024-10-29T13:55:57Z" level=debug msg="error cleaning up intermediate mount NS: remounting \"/var/tmp/buildah3386043866/mnt/rootfs/etc/pki/entitlement\" in mount namespace with flags 0x0 instead of 0x1: permission denied"
The same does not happens if we use image quay.io/buildah/stable:v1.32.0 (or lower).
HOW REPRODUCIBLE
100 %
REPROUCER
You can find a simple reproducer here; basically, the pod that would trigger the error is the following:
Do you have the full log output?
The remounting message indicates that it failed to change the mount flags on the bind mount from read-only to read-write. If the /etc/pki/entitlement mount in the build container ("buildah-1-32-2-not-working") is read-only, as the error message suggests, try adding the :ro option to the -v flag argument.
Do you have the full log output? The remounting message indicates that it failed to change the mount flags on the bind mount from read-only to read-write. If the /etc/pki/entitlement mount in the build container ("buildah-1-32-2-not-working") is read-only, as the error message suggests, try adding the :ro option to the -v flag argument.
@nalind modifying the buildah bud command as follow did the trick!
My suspicion is that when parsing the bind mount options, we make the implicit "rw" explicit, and the logic which later ensures that the flags we have at the target mount match the desired flags trips over it.
ISSUE
In OCP 4 when I execute a
buildah
pod runningquay.io/buildah/stable:v1.32.2
(or upper version) and mountingetc-pki-entitlement
as a secret the pod fails its execution with the following error:The same does not happens if we use image
quay.io/buildah/stable:v1.32.0
(or lower).HOW REPRODUCIBLE
100 %
REPROUCER
You can find a simple reproducer here; basically, the pod that would trigger the error is the following:
The text was updated successfully, but these errors were encountered: