Skip to content

Commit

Permalink
Update required docker version to 1.12, including oc cluster up
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Minter committed Mar 7, 2017
1 parent 11034b2 commit 7e5c173
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 25 deletions.
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
# 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

0 comments on commit 7e5c173

Please sign in to comment.