Skip to content

Commit 36865f9

Browse files
Merge pull request #16785 from csrwng/update_minimum_docker
Automatic merge from submit-queue (batch tested with PRs 16620, 16785). Update minimum docker version required for the node The upstream minimum Docker API version has moved up to 1.22 https://github.com/openshift/origin/blob/master/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go#L31 We should do likewise in origin code.
2 parents 6ab2f88 + d66e91a commit 36865f9

File tree

1 file changed

+11
-3
lines changed
  • pkg/cmd/server/kubernetes/node

1 file changed

+11
-3
lines changed

pkg/cmd/server/kubernetes/node/node.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/openshift/origin/pkg/volume/emptydir"
2929
)
3030

31-
const minimumDockerAPIVersionWithPullByID = "1.18"
31+
const minimumDockerAPIVersionWithPullByID = "1.22"
3232

3333
// EnsureKubeletAccess performs a number of test operations that the Kubelet requires to properly function.
3434
// All errors here are fatal.
@@ -127,7 +127,7 @@ func (c *NodeConfig) EnsureDocker(docker *dockerutil.Helper) {
127127
}
128128

129129
if serverVersion.LessThan(minimumPullByIDVersion) {
130-
c.HandleDockerError(fmt.Sprintf("Docker 1.6 or later (server API version 1.18 or later) required."))
130+
c.HandleDockerError(fmt.Sprintf("Docker 1.6 or later (server API version %s or later) required.", minimumDockerAPIVersionWithPullByID))
131131
return
132132
}
133133

@@ -140,7 +140,15 @@ func (c *NodeConfig) HandleDockerError(message string) {
140140
glog.Fatalf("error: %s", message)
141141
}
142142
glog.Errorf("WARNING: %s", message)
143-
c.DockerClient = &dockertools.FakeDockerClient{VersionInfo: dockertypes.Version{APIVersion: "1.18"}}
143+
c.DockerClient = &dockertools.FakeDockerClient{
144+
VersionInfo: dockertypes.Version{
145+
APIVersion: minimumDockerAPIVersionWithPullByID,
146+
Version: "1.13",
147+
},
148+
Information: dockertypes.Info{
149+
CgroupDriver: "systemd",
150+
},
151+
}
144152
}
145153

146154
// EnsureVolumeDir attempts to convert the provided volume directory argument to

0 commit comments

Comments
 (0)