-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
fix mount propagation on rootfs for containerized node #13327
Conversation
@csrwng -- do you do the same w/ oc cluster up? |
@derekwaynecarr we currently mount the volumes dir with :rslave, but do not specify a propagation mode for /rootfs. Inspecting my local rhel machine, (running docker-common-1.12.5-14.el7.x86_64), the /rootfs mount is set to rprivate propagation mode. So we have 2 mounts: -v /var/lib/origin/openshift.local.volumes:/var/lib/origin/openshift.local.volumes:rslave |
@sdodson does this need to be fixed somewhere in ansible too? or does ansible get it from here? |
Sounds like the same change needs to be made in the cluster up code. |
Shouldn't container first exit/stop before we try to detach volume |
@eparis yes, we need to update ansible here https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_node/templates/openshift.docker.node.service#L18 for affected versions |
@giuseppe Also, need to check for this on system containers |
I want to make sure we all think this is the right fix. @pmorie can you weigh in as resident propagation mode expert. |
We should probably have specified this in the systemd unit file always instead of relying on it being the default. This change LGTM. |
@sdodson thanks for tagging me. For the system container I am already using rslave for the rootfs propagation: https://github.com/openshift/origin/blob/master/images/node/system-container/config.json.template#L318 |
Why do we need to mount all of "/" inside container? don't we just need "/proc" ? |
@gnufied it needs at least Strangely Since we use |
[merge] |
merged failed on openshift/openshift-ansible#3603. can someone remerge this? |
[merge] because of the flake he pointed out |
@stevekuznetsov last merge run failed at
Any help? Not sure if this is a flake or would happen again if someone bumped it. |
flake openshift/origin-gce#15 |
Flake is openshift/origin-gce#15 |
@sdodson @stevekuznetsov thanks. Can I get a merge again? |
[merge] again |
[Test]ing while waiting on the merge queue |
Evaluated for origin test up to c9174c2 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/327/) (Base Commit: 612dcfb) |
you heard him, we [merge] after flakes! |
I really should write myself a bot to auto re tag [merge] on these things. |
I filed #13485 |
Evaluated for origin merge up to c9174c2 |
continuous-integration/openshift-jenkins/merge FAILURE (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/167/) (Base Commit: 0343989) |
I'm done with this PR. |
We don't have a full Ansible containerized deployment test on the merge queue for this ... so @sdodson FYI this may impact you guys? |
Yes, the bug actually gets fixed in the installer anyway |
Nice |
xref https://bugzilla.redhat.com/show_bug.cgi?id=1427807
For the containerized node, the host's rootfs is mounted at /rootfs in the node container. Back in docker 1.10.3 days, the default propagation mode was
rslave
by default. However in 1.12 is itrprivate
.This creates a problem when the node process nsenters the host mount namespace to mount volumes. If the node service is restarted (i.e. the container is stopped, removed, then started again), any volume mount points in the host are mounted rprivate in /rootfs in the node container. When any pods using the volumes are deleted, the node deletes the mount point in the host, but the /rootfs mount point in the node container is not updated due to being
rprivate
and prevents the volume from detaching withdevice is busy
.This PR enforces
rslave
on the /rootfs volume so that volume detach can complete.@derekwaynecarr @eparis @rhatdan @gnufied @chao007 @wongma7