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

Ignore upgradable false condition on TechPreview clusters #26349

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

JoelSpeed
Copy link
Contributor

While trying to set up CI testing for clusters with a TechPreviewNoUpgrade feature gate, this test fails as Kube API server blocks upgrades for tech preview clusters.

This PR adds an exception so that if a cluster has a TechPreviewNoUpgrade feature set enabled, and the appropriate condition, this will no longer prevent the test from passing.

Specifically it prevents this error:

Some cluster operators are not ready: kube-apiserver (Upgradeable=False FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates)

Ref: openshift/release#19845

@JoelSpeed
Copy link
Contributor Author

I have now tested this on a cluster and it is working as expected

@JoelSpeed
Copy link
Contributor Author

/retest

// kube-apiserver blocks upgrades when feature gates are present.
// Allow testing of TechPreviewNoUpgrade clusters by ignoring this condition.
if isTechPreview && name == "kube-apiserver" && isKubeAPIUpgradableTechPreviewCondition(worstCondition) {
continue
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this risk ignoring other failure conditions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This may depend on what surprisingConditions returns. I would expect this condition to be relatively low down the list of bad conditions, but it's something I need to check.

If my assumption that this isn't a terrible condition is correct, then another failure should take precedence in assignment of worstCondition and we should be safe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed, Upgradable is the last one it looks for when it's searching the conditions, this should be safe as is, if the available or degraded conditions are not as expected they will take precedence

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

+1, this generally makes sense to me and will help with the tests

@mdbooth
Copy link
Contributor

mdbooth commented Jul 30, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2021
@mdbooth
Copy link
Contributor

mdbooth commented Jul 30, 2021

/assign @njhale

@smarterclayton
Copy link
Contributor

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, mdbooth, smarterclayton

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 10, 2021
@smarterclayton smarterclayton added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 10, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@JoelSpeed
Copy link
Contributor Author

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci openshift-ci bot merged commit 6521ee6 into openshift:master Aug 11, 2021
@JoelSpeed JoelSpeed deleted the ignore-kas-condition-tpnu branch August 11, 2021 13:47
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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants