Skip to content

Prevent dind containers from being targeted by oci-systemd-hooks - #9620

Merged
openshift-bot merged 3 commits into
openshift:masterfrom
marun:dind-oci-hook-compat
Jun 30, 2016
Merged

openshift-bot merged 3 commits into
openshift:masterfrom
marun:dind-oci-hook-compat

Conversation

@marun

@marun marun commented Jun 28, 2016 •

Copy link
Copy Markdown
Contributor

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

marun added 3 commits June 28, 2016 22:09
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.
@marun

marun commented Jun 28, 2016

Copy link
Copy Markdown
Contributor Author

cc: @mrunalp The hardlinking appears to do the trick.

@marun

marun commented Jun 28, 2016

Copy link
Copy Markdown
Contributor Author

[testextended][extended:networking]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin testextended up to 825813f

@mrunalp

mrunalp commented Jun 28, 2016

Copy link
Copy Markdown
Member

LGTM

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/256/) (Extended Tests: networking)

Comment thread images/dind/Dockerfile
systemd-udev-hwdb-update.service\
systemd-udev-trigger.service\
systemd-udevd.service\
systemd-vconsole-setup.service

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this wasn't here before but I'm guessing you want to add masking this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I periodically mask out processes that fail to start and that dind doesn't depend on.

@ncdc

ncdc commented Jun 29, 2016

Copy link
Copy Markdown
Contributor

1 question; otherwise LGTM

@knobunc

knobunc commented Jun 29, 2016

Copy link
Copy Markdown
Contributor

LGTM. Nice work, thanks Maru.

@ncdc

ncdc commented Jun 29, 2016

Copy link
Copy Markdown
Contributor

[merge]

Comment thread images/dind/Dockerfile
## 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were oci-systemd-hooks doing anything helpful/necessary that this will opt us out of?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like we would need that

@openshift-bot

openshift-bot commented Jun 29, 2016 •

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5588/) (Image: devenv-rhel7_4491)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 825813f

@openshift-bot

Copy link
Copy Markdown
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 825813f

@openshift-bot

Copy link
Copy Markdown
Contributor

@marun

marun commented Jun 29, 2016

Copy link
Copy Markdown
Contributor Author

Yum flake #9203

@knobunc @ncdc Please remerge

@ncdc

ncdc commented Jun 29, 2016

Copy link
Copy Markdown
Contributor

@marun it's no. 4 in the merge queue. That test failure was a test run, not a merge run.

@marun

marun commented Jun 29, 2016

Copy link
Copy Markdown
Contributor Author

@ncdc oops, thank you for the clarification!

@openshift-bot
openshift-bot merged commit e425c5f into openshift:master Jun 30, 2016
@marun
marun deleted the dind-oci-hook-compat branch June 30, 2016 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extended network tests failing due to docker/image/something problems (again)

6 participants