From 6a60535d823321f93bcd0fb6153b1829723ef144 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sat, 28 Apr 2018 18:44:55 -0400 Subject: [PATCH] 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. --- pkg/oc/bootstrap/docker/status.go | 34 ------------------------------- test/extended/clusterup.sh | 14 ++++++------- 2 files changed, 7 insertions(+), 41 deletions(-) diff --git a/pkg/oc/bootstrap/docker/status.go b/pkg/oc/bootstrap/docker/status.go index 9c0ac0c32af9..f659643e1501 100644 --- a/pkg/oc/bootstrap/docker/status.go +++ b/pkg/oc/bootstrap/docker/status.go @@ -17,7 +17,6 @@ import ( configapilatest "github.com/openshift/origin/pkg/cmd/server/apis/config/latest" "github.com/openshift/origin/pkg/oc/bootstrap/docker/dockerhelper" "github.com/openshift/origin/pkg/oc/bootstrap/docker/errors" - "github.com/openshift/origin/pkg/oc/bootstrap/docker/exec" "github.com/openshift/origin/pkg/oc/bootstrap/docker/openshift" "github.com/openshift/origin/pkg/oc/cli/util/clientcmd" ) @@ -112,39 +111,6 @@ func (c *ClientStatusConfig) Status(f *clientcmd.Factory, out io.Writer) error { fmt.Fprint(out, status(container, masterConfig)) - notReady := 0 - - eh := exec.NewExecHelper(dockerClient, openshift.ContainerName) - - stdout, _, _ := eh.Command("oc", "get", "dc", "docker-registry", "-n", "default", "-o", "template", "--template", "{{.status.availableReplicas}}").Output() - if stdout != "1" { - fmt.Fprintln(out, "Notice: Docker registry is not yet ready") - notReady++ - } - - stdout, _, _ = eh.Command("oc", "get", "dc", "router", "-n", "default", "-o", "template", "--template", "{{.status.availableReplicas}}").Output() - if stdout != "1" { - fmt.Fprintln(out, "Notice: Router is not yet ready") - notReady++ - } - - stdout, _, _ = eh.Command("oc", "get", "job", "persistent-volume-setup", "-n", "default", "-o", "template", "--template", "{{.status.succeeded}}").Output() - if stdout != "1" { - fmt.Fprintln(out, "Notice: Persistent volumes are not yet ready") - notReady++ - } - - stdout, _, _ = eh.Command("oc", "get", "is", "-n", "openshift", "-o", "template", "--template", `{{range .items}}{{if not .status.tags}}notready{{end}}{{end}}`).Output() - if len(stdout) > 0 { - fmt.Fprintln(out, "Notice: Imagestreams are not yet ready") - notReady++ - } - - if notReady > 0 { - fmt.Fprintf(out, "\nNotice: %d OpenShift component(s) are not yet ready (see above)\n", notReady) - return fmt.Errorf("") - } - return nil } diff --git a/test/extended/clusterup.sh b/test/extended/clusterup.sh index 5093979b88c6..aa2ffdf7f942 100755 --- a/test/extended/clusterup.sh +++ b/test/extended/clusterup.sh @@ -169,7 +169,7 @@ function os::test::extended::clusterup::noargs () { os::test::extended::clusterup::standard_test \ --base-dir=${base_dir} \ --tag="$ORIGIN_COMMIT" \ - --loglevel=5 \ + --loglevel=4 \ ${@} } @@ -177,8 +177,8 @@ function os::test::extended::clusterup::noargs () { function os::test::extended::clusterup::enable () { local base_dir base_dir=$(os::test::extended::clusterup::make_base_dir "enable") - os::cmd::expect_success "oc cluster up --loglevel=5 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=* --write-config" - os::cmd::expect_failure_and_text "oc cluster up --loglevel=5 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=foo" 'use cluster add instead' + os::cmd::expect_success "oc cluster up --loglevel=4 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=* --write-config" + os::cmd::expect_failure_and_text "oc cluster up --loglevel=4 --base-dir=${base_dir} --tag=${ORIGIN_COMMIT} --enable=foo" 'use cluster add instead' } # Tests creating a cluster with specific host directories @@ -349,19 +349,19 @@ readonly extra_args=( # Test the previous OCP release # TODO - enable this once v3.9 ships, v3.7 didn't have a TSB image so it's # annoying to test. - #"--loglevel=5 --image=registry.access.redhat.com/openshift3/ose --tag=v3.7" + #"--loglevel=4 --image=registry.access.redhat.com/openshift3/ose --tag=v3.7" # Test the previous origin release # TODO - enable this once oc cluster up v3.9 supports modifiying cluster # roles on a 3.7 cluster image (https://github.com/openshift/origin/issues/17867) - # "--loglevel=5 --image=docker.io/openshift/origin --tag=v3.7.0" + # "--loglevel=4 --image=docker.io/openshift/origin --tag=v3.7.0" # Test the current published release # disabling this based on irc with clayton. This is more strict than openshift-ansible. - #"--loglevel=5" # can't be empty, so pass something benign + #"--loglevel=4" # can't be empty, so pass something benign # Test the code being delivered - "--loglevel=5 --server-loglevel=5 --tag=${ORIGIN_COMMIT}" + "--loglevel=4 --server-loglevel=4 --tag=${ORIGIN_COMMIT}" ) tests=("${1:-"${default_tests[@]}"}")