Skip to content

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

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
sthaha:fix-mon-plugin-upgrade-blocker
Jun 29, 2023
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
sthaha:fix-mon-plugin-upgrade-blocker

Conversation

@sthaha

@sthaha sthaha commented Jun 23, 2023

Copy link
Copy Markdown

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
Copy Markdown
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.

Details

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 requested review from raptorsun and slashpai June 23, 2023 04:26
@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
Comment thread pkg/client/client.go Outdated
@jan--f

jan--f commented Jun 23, 2023

Copy link
Copy Markdown
Contributor

/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
Copy Markdown
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

Details

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
Comment thread pkg/tasks/monitoring_plugin.go Outdated
Comment thread pkg/operator/operator.go Outdated
Comment thread pkg/tasks/monitoring_plugin.go Outdated
@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

@simonpasquier simonpasquier left a comment

Copy link
Copy Markdown
Contributor

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).

Comment thread pkg/tasks/monitoring_plugin.go Outdated
@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

sthaha commented Jun 28, 2023

Copy link
Copy Markdown
Author

/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
Comment thread pkg/operator/operator.go
@sthaha

sthaha commented Jun 28, 2023

Copy link
Copy Markdown
Author

/retest-required

1 similar comment
@sthaha

sthaha commented Jun 28, 2023

Copy link
Copy Markdown
Author

/retest-required

@openshift-ci

openshift-ci Bot commented Jun 28, 2023 •

Copy link
Copy Markdown
Contributor

@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.

Details

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

sthaha commented Jun 29, 2023

Copy link
Copy Markdown
Author

/retest-required

@jan--f

jan--f commented Jun 29, 2023

Copy link
Copy Markdown
Contributor

/lgtm

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

openshift-ci Bot commented Jun 29, 2023

Copy link
Copy Markdown
Contributor

[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

Details 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
@openshift-ci-robot

Copy link
Copy Markdown
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.

Details

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.

5 participants