Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check status of router, registry, metrics, logging, imagestreams in oc cluster status #14436

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

jim-minter
Copy link
Contributor

fixes #12224

@openshift/devex
@csrwng

@csrwng
Copy link
Contributor

csrwng commented Jun 1, 2017

@jim-minter just a general comment... not sure that a warning is the best way to report that the registry/router/etc. is not yet running. It may lead people to think that there's something wrong with their cluster. I would simply report that it's either running or not running. Maybe a warning is warranted only when the uptime of the container exceeds a certain threshold and the registry or router are still not functional.


resp, _ := insecureCli.Get(config.AssetConfig.MetricsPublicURL + "/status")
if resp == nil || resp.StatusCode != http.StatusOK {
fmt.Println("Warning: metrics are not yet successfully deployed")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s /are/is/ ... I would tend to think of metrics as a singular component

@csrwng
Copy link
Contributor

csrwng commented Jun 1, 2017

It would also be helpful to report the status of the persistent volume job (-n default job/persistent-volume-setup)

@jim-minter
Copy link
Contributor Author

@csrwng all done

@csrwng
Copy link
Contributor

csrwng commented Jun 5, 2017

So I tried this locally ... I get this output:

The OpenShift cluster was started 31 seconds ago

Web console URL: https://127.0.0.1:8443

Config is at host directory /var/lib/origin/openshift.local.config
Volumes are at host directory /var/lib/origin/openshift.local.volumes
Persistent volumes are at host directory /var/lib/origin/openshift.local.pv
Data will be discarded when cluster is destroyed

Router is not yet successfully deployed
Persistent volumes are not yet successfully created
Error: OpenShift cluster additional health checks failed

So a couple of nits ...

  1. the message about persistent volumes could be better... maybe say something to the effect that creation has not completed. Even when the job hasn't completed, you are able to start using PV's since some will have been created.

  2. The last line would sound better if it said something like provisioning tasks are still in progress... which is not necessarily an error.

Also, just a question, why are we doing the logging check that way? (Instead of for example hitting a URL like we do with metrics?)

@jim-minter
Copy link
Contributor Author

Also, just a question, why are we doing the logging check that way? (Instead of for example hitting a URL like we do with metrics?)

Because of the oauth proxy, I couldn't find a suitable URL to hit. If you can find one, do let me know!

@csrwng
Copy link
Contributor

csrwng commented Jun 5, 2017

@sosiouxme @jcantrill please see above. Is there a reliable check that we can do to ensure that logging is working?

@sosiouxme
Copy link
Member

"Working" comprises a lot of different things, some more subtle than others. But if we're just looking for "present" then why not hit the public logging URL and check that it returns a 302 status (as opposed to 503 if nothing were listening)? Technically the logging stack doesn't have to be deployed in the logging namespace; and I don't think you want to recreate oc adm diagnostics AggregatedLogging in order to get a thorough test for "working".

@jim-minter jim-minter force-pushed the issue12224 branch 3 times, most recently from 4533795 to 19f0fce Compare June 6, 2017 15:02
@jim-minter
Copy link
Contributor Author

@csrwng updated and repushed:

[root@default origin]# oc cluster status
The OpenShift cluster was started 15 seconds ago

Web console URL: https://127.0.0.1:8443

Config is at host directory /var/lib/origin/openshift.local.config
Volumes are at host directory /var/lib/origin/openshift.local.volumes
Persistent volumes are at host directory /var/lib/origin/openshift.local.pv
Data will be discarded when cluster is destroyed

Notice: Docker registry is not yet ready
Notice: Router is not yet ready
Notice: Persistent volumes are not yet ready
Notice: Imagestreams are not yet ready

Notice: 4 OpenShift component(s) are not yet ready (see above)

@csrwng
Copy link
Contributor

csrwng commented Jun 6, 2017

LGTM
[merge]

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@jim-minter
Copy link
Contributor Author

re-pushed with fix to failing 'oc cluster status' test, ptal/remerge

@csrwng
Copy link
Contributor

csrwng commented Jun 7, 2017

[merge]

notReady++
}

stdout, _, _ = eh.Command(strings.Split("oc get dc router -n default -o template --template {{.status.availableReplicas}}", " ")...).Output()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using split here and not below? Don't use split.


eh := exec.NewExecHelper(dockerClient, openshift.OpenShiftContainer)

stdout, _, _ := eh.Command(strings.Split("oc get dc docker-registry -n default -o template --template {{.status.availableReplicas}}", " ")...).Output()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use split.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the registry runs as a daemon set?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is based on the default set by oc cluster up.

@jim-minter
Copy link
Contributor Author

@csrwng repushed to take care of @smarterclayton's comments above - please remerge

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to fc526b7

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2048/) (Base Commit: 2458531)

@jim-minter
Copy link
Contributor Author

@csrwng ping :)

@csrwng
Copy link
Contributor

csrwng commented Jun 12, 2017

[merge]

@csrwng
Copy link
Contributor

csrwng commented Jun 12, 2017

Flakes #14385 and #14590
[merge]

@csrwng
Copy link
Contributor

csrwng commented Jun 12, 2017

#14603
#14208
[merge]

@csrwng
Copy link
Contributor

csrwng commented Jun 13, 2017

#14523
[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to fc526b7

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 13, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/978/) (Base Commit: 1284263) (Image: devenv-rhel7_6347)

@openshift-bot openshift-bot merged commit a014711 into openshift:master Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oc cluster status extensions
6 participants