Skip to content

Commit 6a60535

Browse files
Remove parts of oc status that depend on oc in node container
Will restore in the future. Also reduce logging level on tests below the unintelligible threshold.
1 parent cef740e commit 6a60535

File tree

2 files changed

+7
-41
lines changed

2 files changed

+7
-41
lines changed

pkg/oc/bootstrap/docker/status.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
configapilatest "github.com/openshift/origin/pkg/cmd/server/apis/config/latest"
1818
"github.com/openshift/origin/pkg/oc/bootstrap/docker/dockerhelper"
1919
"github.com/openshift/origin/pkg/oc/bootstrap/docker/errors"
20-
"github.com/openshift/origin/pkg/oc/bootstrap/docker/exec"
2120
"github.com/openshift/origin/pkg/oc/bootstrap/docker/openshift"
2221
"github.com/openshift/origin/pkg/oc/cli/util/clientcmd"
2322
)
@@ -112,39 +111,6 @@ func (c *ClientStatusConfig) Status(f *clientcmd.Factory, out io.Writer) error {
112111

113112
fmt.Fprint(out, status(container, masterConfig))
114113

115-
notReady := 0
116-
117-
eh := exec.NewExecHelper(dockerClient, openshift.ContainerName)
118-
119-
stdout, _, _ := eh.Command("oc", "get", "dc", "docker-registry", "-n", "default", "-o", "template", "--template", "{{.status.availableReplicas}}").Output()
120-
if stdout != "1" {
121-
fmt.Fprintln(out, "Notice: Docker registry is not yet ready")
122-
notReady++
123-
}
124-
125-
stdout, _, _ = eh.Command("oc", "get", "dc", "router", "-n", "default", "-o", "template", "--template", "{{.status.availableReplicas}}").Output()
126-
if stdout != "1" {
127-
fmt.Fprintln(out, "Notice: Router is not yet ready")
128-
notReady++
129-
}
130-
131-
stdout, _, _ = eh.Command("oc", "get", "job", "persistent-volume-setup", "-n", "default", "-o", "template", "--template", "{{.status.succeeded}}").Output()
132-
if stdout != "1" {
133-
fmt.Fprintln(out, "Notice: Persistent volumes are not yet ready")
134-
notReady++
135-
}
136-
137-
stdout, _, _ = eh.Command("oc", "get", "is", "-n", "openshift", "-o", "template", "--template", `{{range .items}}{{if not .status.tags}}notready{{end}}{{end}}`).Output()
138-
if len(stdout) > 0 {
139-
fmt.Fprintln(out, "Notice: Imagestreams are not yet ready")
140-
notReady++
141-
}
142-
143-
if notReady > 0 {
144-
fmt.Fprintf(out, "\nNotice: %d OpenShift component(s) are not yet ready (see above)\n", notReady)
145-
return fmt.Errorf("")
146-
}
147-
148114
return nil
149115
}
150116

test/extended/clusterup.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ function os::test::extended::clusterup::noargs () {
169169
os::test::extended::clusterup::standard_test \
170170
--base-dir=${base_dir} \
171171
--tag="$ORIGIN_COMMIT" \
172-
--loglevel=5 \
172+
--loglevel=4 \
173173
${@}
174174
}
175175

176176
# Test the usage of --enable flag
177177
function os::test::extended::clusterup::enable () {
178178
local base_dir
179179
base_dir=$(os::test::extended::clusterup::make_base_dir "enable")
180-
os::cmd::expect_success "oc cluster up --loglevel=5 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=* --write-config"
181-
os::cmd::expect_failure_and_text "oc cluster up --loglevel=5 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=foo" 'use cluster add instead'
180+
os::cmd::expect_success "oc cluster up --loglevel=4 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=* --write-config"
181+
os::cmd::expect_failure_and_text "oc cluster up --loglevel=4 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=foo" 'use cluster add instead'
182182
}
183183

184184
# Tests creating a cluster with specific host directories
@@ -349,19 +349,19 @@ readonly extra_args=(
349349
# Test the previous OCP release
350350
# TODO - enable this once v3.9 ships, v3.7 didn't have a TSB image so it's
351351
# annoying to test.
352-
#"--loglevel=5 --image=registry.access.redhat.com/openshift3/ose --tag=v3.7"
352+
#"--loglevel=4 --image=registry.access.redhat.com/openshift3/ose --tag=v3.7"
353353

354354
# Test the previous origin release
355355
# TODO - enable this once oc cluster up v3.9 supports modifiying cluster
356356
# roles on a 3.7 cluster image (https://github.com/openshift/origin/issues/17867)
357-
# "--loglevel=5 --image=docker.io/openshift/origin --tag=v3.7.0"
357+
# "--loglevel=4 --image=docker.io/openshift/origin --tag=v3.7.0"
358358

359359
# Test the current published release
360360
# disabling this based on irc with clayton. This is more strict than openshift-ansible.
361-
#"--loglevel=5" # can't be empty, so pass something benign
361+
#"--loglevel=4" # can't be empty, so pass something benign
362362

363363
# Test the code being delivered
364-
"--loglevel=5 --server-loglevel=5 --tag=${ORIGIN_COMMIT}"
364+
"--loglevel=4 --server-loglevel=4 --tag=${ORIGIN_COMMIT}"
365365

366366
)
367367
tests=("${1:-"${default_tests[@]}"}")

0 commit comments

Comments
 (0)