Skip to content
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

node, syscontainer: drop /var/lib/docker mount point #15115

Merged

Conversation

giuseppe
Copy link
Member

Reference: #15105

Signed-off-by: Giuseppe Scrivano [email protected]

@giuseppe giuseppe changed the title node, syscontainer: drop /var/lib/docker mount point [DON'T MERGE] node, syscontainer: drop /var/lib/docker mount point Jul 10, 2017
@ashcrow
Copy link
Member

ashcrow commented Jul 10, 2017

The change itself looks good.

See https://bugzilla.redhat.com/show_bug.cgi?id=1467824

@giuseppe giuseppe changed the title [DON'T MERGE] node, syscontainer: drop /var/lib/docker mount point node, syscontainer: drop /var/lib/docker mount point Jul 11, 2017
@giuseppe giuseppe force-pushed the sc_drop_var_lib_docker branch from ff55619 to 2564c62 Compare July 11, 2017 10:04
@giuseppe
Copy link
Member Author

It doesn't work if I drop the /var/lib/docker mount point altogether as the build will try to access log files that are under /var/lib/docker/containers, so I've replaced the mount point instead of dropping it completely. I've verified that I am able to build and deploy a POD with this change.

@giuseppe giuseppe force-pushed the sc_drop_var_lib_docker branch from 2564c62 to a21e5a9 Compare July 11, 2017 10:17
@giuseppe
Copy link
Member Author

@rhvgoyal thanks for the review. I've added another patch that drops any mount point under /var/lib/docker/containers (except /var/lib/docker/containers itself).

I've verified that no shm mount is leaked into the node container.

@rhvgoyal
Copy link

oci-umount will do this for you anyway. So you don't have to do this yourself?

Given you need /var/lib/docker/containers/ to access these logs, I would say for your use case volume mount it in. And oci-umount will make sure all mount points under /var/lib/docker/containers don't show up inside containers.

@giuseppe
Copy link
Member Author

does oci-umount work as a runC hook? There are some differences in the way hooks work with runC compared to our version of Docker. We needed to do some changes into oci-systemd-hook and oci-register-machine to get them working with runC. So if it was not already tested, it will probably require some (minor) changes to oci-umount before it can be used within runC.

@rhvgoyal
Copy link

oci-umount is supposed to be working same way as oci-umount-systemd hook. I think ultimately they are runc hooks. @dwalsh had done some fixes recently to take care of some of the differences. So I am hoping latest upstream works for you. Please give it a try. If not, let us know, we will fix it.

@rhvgoyal
Copy link

I have tested oci-umount only with docker. With system-containers and runc, calling convention might be little different (as you mentioned) and it might require some tweaks.

Having said that @dwlash had done some changes recently so that it works with cri-o and I hope that takes care of system container issues as well.

@rhvgoyal
Copy link

cc @rhatdan

@giuseppe
Copy link
Member Author

@rhvgoyal @rhatdan thanks for the update, but unfortunately we are still not able to use it yet as it is not on RHELAH 7.3.6.
That opens a bigger question, how will we distribute OCI hooks if we will ever stop distributing docker as part of the image and consume it exclusively as a system container? Will the runC .rpm depends on them?

@rhvgoyal
Copy link

making runc rpm depend on oci hook rpms sounds reasonable to me.

I am sort of surprised that 7.3.6 does not have oci-umount package.

@rhvgoyal
Copy link

cc @lsm5

@rhatdan
Copy link
Contributor

rhatdan commented Jul 11, 2017

oci-umount is currently a subpackage of the docker package. We want to move this out. CRI-O will depend on oci-umount also.
The latest oci-umount should work with the older version of docker-runc as well as the newer runc versions.

@openshift-merge-robot openshift-merge-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 24, 2017
@ashcrow
Copy link
Member

ashcrow commented Jul 27, 2017

/assign @sdodson

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2017
@sdodson
Copy link
Member

sdodson commented Jul 28, 2017

/approve no-issue

@ashcrow
Copy link
Member

ashcrow commented Jul 28, 2017

@sdodson

Required Github CI test is not green: ci/openshift-jenkins/cmd

Not sure what that's about ...

@stevekuznetsov
Copy link
Contributor

/test all

@ashcrow that means the required test did not finish successfully

@ashcrow
Copy link
Member

ashcrow commented Jul 28, 2017

@stevekuznetsov thanks! I returned yesterday and didn't realize the new commands.

@giuseppe
Copy link
Member Author

/test all

@ashcrow
Copy link
Member

ashcrow commented Oct 19, 2017

/retest

@ashcrow
Copy link
Member

ashcrow commented Oct 19, 2017

/test extended_conformance_gce

@ashcrow
Copy link
Member

ashcrow commented Oct 19, 2017

Looks totally unrelated but ...

    Play:     Initialize host facts
     Task:     initialize_facts set_fact on openshift_docker_hosted_registry_network
     Message:  the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'dict object' has no attribute 'openshift'
               
               The error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/initialize_facts.yml': line 154, column 5, but may
               be elsewhere in the file depending on the exact syntax problem.
               
               The offending line appears to be:
               
               
                 - name: initialize_facts set_fact on openshift_docker_hosted_registry_network
                   ^ here

@giuseppe
Copy link
Member Author

/retest

with /var/lib/docker/containers

so we don't leak /var/lib/docker/devicemapper mount points
into the container.

Reference: openshift#15105

Signed-off-by: Giuseppe Scrivano <[email protected]>
Do not leave any mount point busy under /var/lib/docker/containers

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe giuseppe force-pushed the sc_drop_var_lib_docker branch from 6543e72 to d14bce0 Compare November 27, 2017 22:08
@ashcrow
Copy link
Member

ashcrow commented Nov 28, 2017

/test cmd

@stevekuznetsov
Copy link
Contributor

@sdodson is this good to go? Missing a LGTM

@ashcrow
Copy link
Member

ashcrow commented Nov 28, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashcrow, giuseppe, sdodson

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 17476, 17143, 15115, 17094, 17500).

@openshift-merge-robot openshift-merge-robot merged commit 404cb18 into openshift:master Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants