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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1835381: Gate Control Plane health on IBMCloud #5092

Merged

Conversation

rawagner
Copy link
Contributor

@rawagner rawagner commented Apr 17, 2020

fixes https://issues.redhat.com/browse/MGMT-438

Im not exactly sure if the implemented gating is fine, but i guess it could be 馃檨
@spadgett @benjaminapetersen

@openshift-ci-robot openshift-ci-robot added component/core Related to console core functionality component/shared Related to console-shared approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 17, 2020
@spadgett
Copy link
Member

cc @csrwng

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

I think this is probably fine. Is there a way to not show Control Plane on the dashboard if we get an empty response? That would avoid the need for the extra flag and the extra request on load. But I'm not sure how hard that is.

We might be able to use the existing CLUSTER_API flag, which checks for the Machine CRD.

query: 'up{job="apiserver"}',
});

return coFetchJSON(promURL)
Copy link
Member

Choose a reason for hiding this comment

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

We should check if PROMETHEUS_BASE_PATH is set before trying to run the query.

@rawagner rawagner force-pushed the control_plane_avail branch 2 times, most recently from 1bd2030 to a4d0256 Compare April 21, 2020 11:18
@rawagner
Copy link
Contributor Author

I didnt realize we could use CLUSTER_API which would be great. PR updated.

@csrwng PTAL

@rawagner rawagner changed the title Gate Control Plane health on metrics availability Gate Control Plane health on CLUSTER_API flag Apr 21, 2020
@csrwng
Copy link

csrwng commented May 12, 2020

@rawagner @spadgett sorry for the delayed response. I tested this on a 4.4.3 cluster with no Machine CRD, but I don't see a difference in the dashboard UI. I still see a Control Panel not available indicator. Also, not sure that checking for the absence of the Machine API is the best approach long term. Currently it is the case that only clusters with a hosted control plane are missing the Machine CRD... however I wonder if a configuration like bare metal could have a control plane but no machine API.
Screen Shot 2020-05-12 at 4 15 55 PM

@openshift-ci-robot openshift-ci-robot added component/dashboard Related to dashboard component/sdk Related to console-plugin-sdk labels May 13, 2020
@rawagner rawagner changed the title Gate Control Plane health on CLUSTER_API flag Gate Control Plane health on IBMCloud May 13, 2020
@rawagner
Copy link
Contributor Author

Infrastructure CR contains info about the current platform, IBM is 'IBMCloud' - thanks for pointing that out @csrwng . The PR is updated to check the infrastructure CR.

Comment on lines 147 to 151
if (disallowedProvider) {
if (
!infrastructureLoaded ||
getInfrastructurePlatform(infrastructure) === disallowedProvider
) {
Copy link
Member

Choose a reason for hiding this comment

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

This can be a single if

Suggested change
if (disallowedProvider) {
if (
!infrastructureLoaded ||
getInfrastructurePlatform(infrastructure) === disallowedProvider
) {
if (disallowedProvider && (
!infrastructureLoaded ||
getInfrastructurePlatform(infrastructure) === disallowedProvider
) {

/**
* Cloud provider which for which the subsystem should be hidden.
*/
disallowedProvider?: string;
Copy link
Member

Choose a reason for hiding this comment

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

We might want to make this an array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, changed to array

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rawagner, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spadgett
Copy link
Member

@rawagner We'll need a Bugzilla to make the bot happy

@rawagner rawagner changed the title Gate Control Plane health on IBMCloud Bug 1835381: Gate Control Plane health on IBMCloud May 13, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label May 13, 2020
@openshift-ci-robot
Copy link
Contributor

@rawagner: This pull request references Bugzilla bug 1835381, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1835381: Gate Control Plane health on IBMCloud

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label May 13, 2020
@openshift-merge-robot openshift-merge-robot merged commit a769da4 into openshift:master May 13, 2020
@openshift-ci-robot
Copy link
Contributor

@rawagner: All pull requests linked via external trackers have merged: openshift/console#5092. Bugzilla bug 1835381 has been moved to the MODIFIED state.

In response to this:

Bug 1835381: Gate Control Plane health on IBMCloud

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.5 milestone May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality component/dashboard Related to dashboard component/sdk Related to console-plugin-sdk component/shared Related to console-shared lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants