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

OCPBUGS-14922: skip console-plugin installation if console CO is absent #2011

Merged

Conversation

sthaha
Copy link
Contributor

@sthaha sthaha commented Jun 23, 2023

This PR fixes the failure to upgrade from OpenShift version 4.13 to 4.14 in environments (such as telco) where console ClusterOperator is disabled. The upgrade fails happens when CMO executes the console-plugin task which fails due to missing ConsolePlugin.

The fix checks for the presence of console ClusterOperator and bails out (with a log message) if it is absent.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 23, 2023
@openshift-ci-robot
Copy link
Contributor

@sthaha: This pull request references Jira Issue OCPBUGS-14922, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR fixes the failure to upgrade from OpenShift version 4.13 to 4.14 in environments (such as telco) where console ClusterOperator is disabled. The upgrade fails happens when CMO executes the console-plugin task which fails due to missing ConsolePlugin.

The fix checks for the presence of console ClusterOperator and bails out (with a log message) if it is absent.

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2023
@sthaha sthaha force-pushed the fix-mon-plugin-upgrade-blocker branch from 66211b3 to 58de492 Compare June 23, 2023 04:39
pkg/client/client.go Outdated Show resolved Hide resolved
@jan--f
Copy link
Contributor

jan--f commented Jun 23, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 23, 2023
@openshift-ci-robot
Copy link
Contributor

@jan--f: This pull request references Jira Issue OCPBUGS-14922, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @Tai-RedHat

In response to this:

/jira refresh

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 openshift-ci bot requested a review from Tai-RedHat June 23, 2023 13:46
@sthaha sthaha force-pushed the fix-mon-plugin-upgrade-blocker branch 2 times, most recently from 681364c to 934c4df Compare June 26, 2023 05:31
pkg/tasks/monitoring_plugin.go Outdated Show resolved Hide resolved
pkg/operator/operator.go Outdated Show resolved Hide resolved
pkg/tasks/monitoring_plugin.go Outdated Show resolved Hide resolved
@sthaha sthaha force-pushed the fix-mon-plugin-upgrade-blocker branch 2 times, most recently from 8f03f88 to 2910eb5 Compare June 27, 2023 05:39
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

The handleEvent() function needs to react on changes to the clusterversion object.

if _, ok := obj.(*configv1.Infrastructure); ok {
klog.Infof("Triggering update due to an infrastructure update")
o.enqueue(cmoConfigMap)
return
}
if _, ok := obj.(*configv1.APIServer); ok {
klog.Infof("Triggering update due to an apiserver config update")
o.enqueue(cmoConfigMap)
return
}
if _, ok := obj.(*v1.PersistentVolumeClaim); ok {
klog.Info("Triggering update due to a PVC update")
o.enqueue(cmoConfigMap)
return
}
if _, ok := obj.(*configv1.Console); ok {
klog.Info("Triggering update due to a console update")
o.enqueue(cmoConfigMap)
return
}
if _, ok := obj.(*configv1.ClusterOperator); ok {
klog.Info("Triggering update due to a cluster operator update")
o.enqueue(cmoConfigMap)
return
}

I'd also replace the existing if blocks by type switches (e.g. https://go.dev/tour/methods/16).

@sthaha sthaha force-pushed the fix-mon-plugin-upgrade-blocker branch 2 times, most recently from e67e7a1 to f7f1f87 Compare June 28, 2023 02:13
@sthaha
Copy link
Contributor Author

sthaha commented Jun 28, 2023

/retest-required

… is disabled

This PR fixes the failure to upgrade from OpenShift version 4.13 to
4.14 in environments (such as telco) where `console` capability is
disabled. The upgrade fails  when CMO executes the console-plugin task
which fails due to missing ConsolePlugin CRD.

The fix checks if `console` capability is enabled in ClusterVersion -
version and bails out (with a log message) if it is disabled.

Signed-off-by: Sunil Thaha <sthaha@redhat.com>
@sthaha sthaha force-pushed the fix-mon-plugin-upgrade-blocker branch from f7f1f87 to 3aac627 Compare June 28, 2023 04:58
@sthaha
Copy link
Contributor Author

sthaha commented Jun 28, 2023

/retest-required

1 similar comment
@sthaha
Copy link
Contributor Author

sthaha commented Jun 28, 2023

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2023

@sthaha: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-single-node 3aac627 link false /test e2e-aws-ovn-single-node
ci/prow/versions 3aac627 link false /test versions

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@sthaha
Copy link
Contributor Author

sthaha commented Jun 29, 2023

/retest-required

@jan--f
Copy link
Contributor

jan--f commented Jun 29, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 29, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan--f, sthaha

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

@openshift-merge-robot openshift-merge-robot merged commit dde6f7e into openshift:master Jun 29, 2023
14 of 16 checks passed
@openshift-ci-robot
Copy link
Contributor

@sthaha: Jira Issue OCPBUGS-14922: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-14922 has been moved to the MODIFIED state.

In response to this:

This PR fixes the failure to upgrade from OpenShift version 4.13 to 4.14 in environments (such as telco) where console ClusterOperator is disabled. The upgrade fails happens when CMO executes the console-plugin task which fails due to missing ConsolePlugin.

The fix checks for the presence of console ClusterOperator and bails out (with a log message) if it is absent.

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.

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. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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