Repository navigation
Prevent dind containers from being targeted by oci-systemd-hooks - #9620
Conversation
Mask failing services that are not essential to running origin.
oci-systemd-hooks detects that a container will run systemd by checking for an entrypoint command of 'systemd' or 'init' and then mounts most cgroups read-only to support running systemd in an unprivileged container. This is not compatible with dind containers, which require running with --privileged to ensure cgroups mounted read-write. This change hardlinks 'init' to 'dind_init' and uses that as the entrypoint to avoid having dind containers be targeted by the hook.
|
cc: @mrunalp The hardlinking appears to do the trick. |
|
[testextended][extended:networking] |
|
Evaluated for origin testextended up to 825813f |
|
LGTM |
|
continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/256/) (Extended Tests: networking) |
| systemd-udev-hwdb-update.service\ | ||
| systemd-udev-trigger.service\ | ||
| systemd-udevd.service\ | ||
| systemd-vconsole-setup.service |
There was a problem hiding this comment.
I see this wasn't here before but I'm guessing you want to add masking this?
There was a problem hiding this comment.
Yes, I periodically mask out processes that fail to start and that dind doesn't depend on.
|
1 question; otherwise LGTM |
|
LGTM. Nice work, thanks Maru. |
|
[merge] |
| ## detect containers using this image as requiring read-only cgroup | ||
| ## mounts. dind containers should be run with --privileged to ensure | ||
| ## cgroups mounted with read-write permissions. | ||
| RUN ln /usr/sbin/init /usr/sbin/dind_init |
There was a problem hiding this comment.
were oci-systemd-hooks doing anything helpful/necessary that this will opt us out of?
There was a problem hiding this comment.
There was a problem hiding this comment.
It doesn't look like we would need that
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5588/) (Image: devenv-rhel7_4491) |
|
Evaluated for origin merge up to 825813f |
|
[Test]ing while waiting on the merge queue |
|
Evaluated for origin test up to 825813f |
|
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5555/) |
|
@marun it's no. 4 in the merge queue. That test failure was a test run, not a merge run. |
|
@ncdc oops, thank you for the clarification! |
oci-systemd-hooks detects that a container will run systemd by checking
for an entrypoint command of 'systemd' or 'init' and then mounts most
cgroups read-only to support running systemd in an unprivileged
container. This is not compatible with dind containers, which require
running with --privileged to ensure cgroups mounted read-write. This
change hardlinks 'init' to 'dind_init' and uses that as the entrypoint
to avoid having dind containers be targeted by the hook.
I'm including a couple of minor dind fixes with this that came up on the way to the fix.
Should supercede #9613 and fixes #9599.
cc: @openshift/networking @ncdc