Skip to content

Commit 8ab340a

Browse files
Merge pull request #17476 from csrwng/clusterup_fix_cgroup_detection
Automatic merge from submit-queue (batch tested with PRs 17476, 17143, 15115, 17094, 17500). cluster up: use server version to detect whether to use cgroup flag The latest origin image no longer includes the kubelet binary and does not support running the openshift binary as a kubelet. This shortcuts detection of the cgroup flag by simply looking at the server version. If 3.7 or newer, then we should just use the flag. Fixes #17474
2 parents f55c2b9 + 23c94fc commit 8ab340a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

pkg/oc/bootstrap/docker/openshift/helper.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ func (h *Helper) updateConfig(configDir string, opt *StartOptions) error {
888888
}
889889
nodeCfg.DNSBindAddress = ""
890890

891-
if h.supportsCgroupDriver() {
891+
if h.supportsCgroupDriver(version) {
892892
// Set the cgroup driver from the current docker
893893
cgroupDriver, err := h.dockerHelper.CgroupDriver()
894894
if err != nil {
@@ -956,7 +956,10 @@ func getUsedPorts(data string) map[int]struct{} {
956956
return ports
957957
}
958958

959-
func (h *Helper) supportsCgroupDriver() bool {
959+
func (h *Helper) supportsCgroupDriver(version semver.Version) bool {
960+
if version.GTE(version37) {
961+
return true
962+
}
960963
script := `#!/bin/bash
961964
962965
# Exit with an error

test/extended/clusterup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ ORIGIN_COMMIT=${ORIGIN_COMMIT:-latest}
315315

316316
echo "Running cluster up tests using tag $ORIGIN_COMMIT"
317317

318+
# Tag the docker registry image with the same tag as the other origin images
319+
docker pull openshift/origin-docker-registry:latest
320+
docker tag openshift/origin-docker-registry:latest openshift/origin-docker-registry:${ORIGIN_COMMIT}
321+
318322
# Ensure that KUBECONFIG is not set
319323
unset KUBECONFIG
320324
for test in "${tests[@]}"; do

0 commit comments

Comments
 (0)