Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ ExecStartPre=bash -c "findmnt ${RUNTIME_DIRECTORY} || mount --make-unbindable --
ExecStartPre=touch ${BIND_POINT}
ExecStart=unshare --mount=${BIND_POINT} --propagation slave mount --make-rshared /
ExecStop=umount -R ${RUNTIME_DIRECTORY}

# Initialize /run/netns as a shared mount point to prevent shadowing race condition
# This must happen before CRI-O starts to ensure all namespace bind mounts have
# the correct parent mount. Without this, 'ip netns add' (called later by network
# components) would create the mount point and shadow any earlier namespace mounts
# created by CRI-O's pinns, causing pods to fail with 'setns: Invalid argument'.
# Creating and deleting a temporary netns retains the side-effect of creating the
# /run/netns mountpoint (but base exit code solely on whether the mountpoint is
# present)
# Reference: OCPBUGS-83562
ExecStartPost=bash -c "ip netns add kubensmnt && ip netns delete kubensmnt || mountpoint -q /run/netns"
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ spec:
ExecStartPre=touch ${BIND_POINT}
ExecStart=unshare --mount=${BIND_POINT} --propagation slave mount --make-rshared /
ExecStop=umount -R ${RUNTIME_DIRECTORY}

# Initialize /run/netns as a shared mount point to prevent shadowing race condition
# This must happen before CRI-O starts to ensure all namespace bind mounts have
# the correct parent mount. Without this, 'ip netns add' (called later by network
# components) would create the mount point and shadow any earlier namespace mounts
# created by CRI-O's pinns, causing pods to fail with 'setns: Invalid argument'.
# Creating and deleting a temporary netns retains the side-effect of creating the
# /run/netns mountpoint (but base exit code solely on whether the mountpoint is
# present)
# Reference: OCPBUGS-83562
ExecStartPost=bash -c "ip netns add kubensmnt && ip netns delete kubensmnt || mountpoint -q /run/netns"
name: container-mount-namespace.service
- dropins:
- contents: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ spec:
ExecStartPre=touch ${BIND_POINT}
ExecStart=unshare --mount=${BIND_POINT} --propagation slave mount --make-rshared /
ExecStop=umount -R ${RUNTIME_DIRECTORY}

# Initialize /run/netns as a shared mount point to prevent shadowing race condition
# This must happen before CRI-O starts to ensure all namespace bind mounts have
# the correct parent mount. Without this, 'ip netns add' (called later by network
# components) would create the mount point and shadow any earlier namespace mounts
# created by CRI-O's pinns, causing pods to fail with 'setns: Invalid argument'.
# Creating and deleting a temporary netns retains the side-effect of creating the
# /run/netns mountpoint (but base exit code solely on whether the mountpoint is
# present)
# Reference: OCPBUGS-83562
ExecStartPost=bash -c "ip netns add kubensmnt && ip netns delete kubensmnt || mountpoint -q /run/netns"
name: container-mount-namespace.service
- dropins:
- contents: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ spec:
ExecStartPre=touch ${BIND_POINT}
ExecStart=unshare --mount=${BIND_POINT} --propagation slave mount --make-rshared /
ExecStop=umount -R ${RUNTIME_DIRECTORY}

# Initialize /run/netns as a shared mount point to prevent shadowing race condition
# This must happen before CRI-O starts to ensure all namespace bind mounts have
# the correct parent mount. Without this, 'ip netns add' (called later by network
# components) would create the mount point and shadow any earlier namespace mounts
# created by CRI-O's pinns, causing pods to fail with 'setns: Invalid argument'.
# Creating and deleting a temporary netns retains the side-effect of creating the
# /run/netns mountpoint (but base exit code solely on whether the mountpoint is
# present)
# Reference: OCPBUGS-83562
ExecStartPost=bash -c "ip netns add kubensmnt && ip netns delete kubensmnt || mountpoint -q /run/netns"
name: container-mount-namespace.service
- dropins:
- contents: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ spec:
ExecStartPre=touch ${BIND_POINT}
ExecStart=unshare --mount=${BIND_POINT} --propagation slave mount --make-rshared /
ExecStop=umount -R ${RUNTIME_DIRECTORY}

# Initialize /run/netns as a shared mount point to prevent shadowing race condition
# This must happen before CRI-O starts to ensure all namespace bind mounts have
# the correct parent mount. Without this, 'ip netns add' (called later by network
# components) would create the mount point and shadow any earlier namespace mounts
# created by CRI-O's pinns, causing pods to fail with 'setns: Invalid argument'.
# Creating and deleting a temporary netns retains the side-effect of creating the
# /run/netns mountpoint (but base exit code solely on whether the mountpoint is
# present)
# Reference: OCPBUGS-83562
ExecStartPost=bash -c "ip netns add kubensmnt && ip netns delete kubensmnt || mountpoint -q /run/netns"
name: container-mount-namespace.service
- dropins:
- contents: |
Expand Down
Loading