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

Update required docker version to 1.12, including oc cluster up #13016

Merged
merged 1 commit into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Here's how to get set up:
** http://git-scm.com/book/en/v2/Getting-Started-Installing-Git[Installing Git]
** https://docs.docker.com/installation/[Installing Docker]
+
NOTE: As of now, OpenShift requires Docker 1.9 or higher.
NOTE: As of now, OpenShift requires Docker 1.12 or higher.
The exact version requirement is documented https://docs.openshift.org/latest/install_config/install/prerequisites.html#installing-docker[here].

2. Next, create a Go workspace directory: +
Expand Down
2 changes: 1 addition & 1 deletion origin.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%global kube_plugin_path /usr/libexec/kubernetes/kubelet-plugins/net/exec/redhat~openshift-ovs-subnet

# docker_version is the version of docker requires by packages
%global docker_version 1.9.1
%global docker_version 1.12
Copy link
Contributor

Choose a reason for hiding this comment

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

@tdawson is this change already in OCP?

Copy link
Member

Choose a reason for hiding this comment

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

No, not in 3.5 or 3.6

Copy link
Contributor

Choose a reason for hiding this comment

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

Is OK for this to merge in for 3.5? Do we need to backport it?

# tuned_version is the version of tuned requires by packages
%global tuned_version 2.3
# openvswitch_version is the version of openvswitch requires by packages
Expand Down
1 change: 0 additions & 1 deletion pkg/bootstrap/docker/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func (c *ClientJoinConfig) StartOpenShiftNode(out io.Writer) error {
opt := &openshift.StartOptions{
ServerIP: c.ServerIP,
UseSharedVolume: !c.UseNsenterMount,
SetPropagationMode: c.SetPropagationMode,
Images: c.imageFormat(),
HostVolumesDir: c.HostVolumesDir,
HostConfigDir: c.HostConfigDir,
Expand Down
13 changes: 2 additions & 11 deletions pkg/bootstrap/docker/openshift/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ type StartOptions struct {
RoutingSuffix string
DNSPort int
UseSharedVolume bool
SetPropagationMode bool
Images string
HostVolumesDir string
HostConfigDir string
Expand Down Expand Up @@ -251,11 +250,7 @@ func (h *Helper) Start(opt *StartOptions, out io.Writer) (string, error) {
env = append(env, "OPENSHIFT_CONTAINERIZED=false")
} else {
binds = append(binds, "/:/rootfs:ro")
propagationMode := ""
if opt.SetPropagationMode {
propagationMode = ":rslave"
}
binds = append(binds, fmt.Sprintf("%[1]s:%[1]s%[2]s", opt.HostVolumesDir, propagationMode))
binds = append(binds, fmt.Sprintf("%[1]s:%[1]s:rslave", opt.HostVolumesDir))
}
env = append(env, opt.Environment...)
binds = append(binds, fmt.Sprintf("%[1]s:%[1]s", opt.DockerRoot))
Expand Down Expand Up @@ -452,11 +447,7 @@ func (h *Helper) StartNode(opt *StartOptions, out io.Writer) error {
env = append(env, "OPENSHIFT_CONTAINERIZED=false")
} else {
binds = append(binds, "/:/rootfs:ro")
propagationMode := ""
if opt.SetPropagationMode {
propagationMode = ":rslave"
}
binds = append(binds, fmt.Sprintf("%[1]s:%[1]s%[2]s", opt.HostVolumesDir, propagationMode))
binds = append(binds, fmt.Sprintf("%[1]s:%[1]s:rslave", opt.HostVolumesDir))
}
env = append(env, opt.Environment...)

Expand Down
15 changes: 4 additions & 11 deletions pkg/bootstrap/docker/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ var (
"prometheus": "examples/prometheus/prometheus.yaml",
"heapster standalone": "examples/heapster/heapster-standalone.yaml",
}
dockerVersion19 = semver.MustParse("1.9.0")
dockerVersion110 = semver.MustParse("1.10.0")
dockerVersion112 = semver.MustParse("1.12.0")
)

// NewCmdUp creates a command that starts openshift on Docker with reasonable defaults
Expand Down Expand Up @@ -198,7 +197,6 @@ type CommonStartConfig struct {
HTTPProxy string
HTTPSProxy string
NoProxy []string
SetPropagationMode bool
RouterIP string
CACert string

Expand Down Expand Up @@ -609,21 +607,17 @@ func (c *CommonStartConfig) CheckNsenterMounter(out io.Writer) error {
// CheckDockerVersion checks that the appropriate Docker version is installed based on whether we are using the nsenter mounter
// or shared volumes for OpenShift
func (c *CommonStartConfig) CheckDockerVersion(out io.Writer) error {
ver, rh, err := c.DockerHelper().Version()
ver, _, err := c.DockerHelper().Version()
if err != nil {
glog.V(1).Infof("Failed to check Docker version: %v", err)
fmt.Fprintf(out, "WARNING: Cannot verify Docker version\n")
return nil
}
needVersion := dockerVersion19
if !rh {
needVersion = dockerVersion110
}
needVersion := dockerVersion112
glog.V(5).Infof("Checking that docker version is at least %v", needVersion)
if ver.LT(needVersion) {
return fmt.Errorf("Docker version is %v, it needs to be %v", ver, needVersion)
fmt.Fprintf(out, "WARNING: Docker version is %v, it needs to be >= %v\n", ver, needVersion)
}
c.SetPropagationMode = ver.GTE(dockerVersion110)
return nil
}

Expand Down Expand Up @@ -760,7 +754,6 @@ func (c *ClientStartConfig) StartOpenShift(out io.Writer) error {
RouterIP: c.RouterIP,
RoutingSuffix: c.RoutingSuffix,
UseSharedVolume: !c.UseNsenterMount,
SetPropagationMode: c.SetPropagationMode,
Images: c.imageFormat(),
HostVolumesDir: c.HostVolumesDir,
HostConfigDir: c.HostConfigDir,
Expand Down