-
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
cluster up: use rslave propagation mode with nsenter mounter #10571
cluster up: use rslave propagation mode with nsenter mounter #10571
Conversation
I've tested this on RHEL (Docker 1.10) and ArchLinux (Docker 1.12) |
@csrwng so what, if any, scenarios are broken with this? docker1.9? |
@bparees afaik none ... we simply continue using nsenter mounter in most linux distros. |
@bparees so the reason that RHEL and Fedora work with nsenter mounter right now is that by default they use 'rslave' propagation mode for all mounts when one is not specified. This is simply forcing other distros to do the same for the volume share. |
ah, maybe it's that defaulting behavior he was explaining. |
The new thing was being able to control the propagation mode of a volume. In the RH distribution of docker prior to 1.9, we carried a patch that made the default propagation mode |
is that not what this PR is taking advantage of? |
@bparees to answer your question more clearly -- pre-1.10 non-RH dockers will not work with this. |
@pmorie thanks. I think we can live w/ that, but i wanted to make sure we understood it. |
@bparees @pmorie hmm, actually it won't work on 1.9.x on any OS. I tried on Debian Jessie and Fedora 22, both with 1.9.1:
It seems that maybe we should outright tell you that we need 1.10 |
Or if running with 1.9, inspect a container to see its mount propagation mode and if 'rslave' then allow you to run. |
@csrwng 1.9.x doesn't support the slave flag in any distribution, but in RH, the propagation mode of bind mounts is always slave |
nm, in 1.9.1 on fedora, inspecting a container doesn't tell you what the propagation mode is. |
I wish there were a way to detect the distro of the docker engine. |
(2) coupled w/ a warning when you're on docker 1.9 and possibly attempting to detect the distro (/etc/redhat-release) as part of the warning would be my preference i think. |
On Tue, Aug 23, 2016 at 11:02 AM, Paul Morie notifications@github.com
|
Thanks, will take a look... it would definitely be a nicer experience if we tell you outright that we don't support your Docker version |
Caveat: what if you run upstream docker on a Red Hat system? |
I will try it, and see what's the difference in 'docker info' |
then hopefully you're running something current :) yes that's an understood limitation of my suggestion, though it sounds like @ncdc's suggestion would cover it. |
If you're running something current, it doesn't really matter. |
that was my point. if we detect the version is 1.10+, then we don't need to determine the distribution. So the detection logic would only fail if:
which seems unlikely. |
7c56c11
to
a3eac5a
Compare
Updated the code to check the Docker version. If the Docker version is < 1.10 and not a Red Hat distro, then we fail. Tested on fedora, rhel, arch linux (newer and older docker versions). |
func (h *Helper) Version() (*semver.Version, error) { | ||
var ( | ||
fedoraPackage = regexp.MustCompile("\\.fc[0-9_]*\\.") | ||
rhelPackage = regexp.MustCompile("\\.el[0-9_]*\\.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
centos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it also has .el7 (just like rhel):
[root@localhost ~]# docker version
Client:
Version: 1.10.3
API version: 1.22
Package version: docker-common-1.10.3-46.el7.centos.10.x86_64
Go version: go1.6.3
Git commit: d381c64-unsupported
Built: Thu Aug 4 13:21:17 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.3
API version: 1.22
Package version: docker-common-1.10.3-46.el7.centos.10.x86_64
Go version: go1.6.3
Git commit: d381c64-unsupported
Built: Thu Aug 4 13:21:17 2016
OS/Arch: linux/amd64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
lgtm, will let @pmorie have the last word. |
a3eac5a
to
5630015
Compare
removed artificial check for mac/windows OS ... we should determine the mount to use based on the docker daemon. tested on os x and windows |
@pmorie bump. happy? |
lgtm, [merge] |
Flake #7706 [merge] Ben Parees | OpenShift On Aug 25, 2016 12:12 PM, "OpenShift Bot" notifications@github.com wrote:
|
Flake #7706 |
[merge] On Thursday, August 25, 2016, OpenShift Bot notifications@github.com
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8464/) (Image: devenv-rhel7_4933) |
Flake #9929 |
Evaluated for origin merge up to 5630015 |
When choosing to use nsenter mounter, mount volumes dir with 'rslave' propagation mode
Fixes #10215