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

Bug 1905778: Fix inconsistent ingress operator status after upgrade #526

Merged
merged 3 commits into from Jan 26, 2021

Conversation

rfredette
Copy link
Contributor

@rfredette rfredette commented Jan 13, 2021

status.DeploymentDegraded was removed in favor of several more specific status fields in 4.6, but if the cluster was upgraded from 4.5 or earlier, the existing DeploymentDegraded status will continue to be reported

If the cluster was upgraded from 4.1 or earlier, status.EndpointPublishingStrategy.LoadBalancer (introduced in 4.2?) may not be present when status.EndpointPublishingStrategy.Type is set to LoadBalancerService. Internally, the assumption is made that this is equivalent to status.EndpointPublishingStrategy.LoadBalancer being set to .LoadBalancer.scope: External, but this PR makes that implicit assumption explicit.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 13, 2021
@openshift-ci-robot
Copy link
Contributor

@rfredette: This pull request references Bugzilla bug 1905778, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

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

In response to this:

[WIP] Bug 1905778: Fix inconsistent ingress operator status after upgrade

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.

func PruneConditions(conditions []operatorv1.OperatorCondition) []operatorv1.OperatorCondition {
for i, condition := range conditions {
switch condition.Type {
case "DeploymentDegraded":
Copy link
Contributor

Choose a reason for hiding this comment

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

We stopped using DeploymentDegraded in 4.6, right? Might be worth dropping a comment above indicating that this condition exists for clusters < 4.6, to avoid any confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea. I'll include a comment about it to clarify

DeploymentDegraded is no longer published as a status. If the cluster
was upgraded past the last version where DeploymentDegraded was
published, the existing status will continue to be listed.

This commit removes the status if it is found.
If the endpoint publishing strategy is type LoadBalancer but no LoadBalancer type is specified, update endpointPublishingStrategy.LoadBalancer to external
@openshift-ci-robot
Copy link
Contributor

@rfredette: This pull request references Bugzilla bug 1905778, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

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

In response to this:

[WIP] Bug 1905778: Fix inconsistent ingress operator status after upgrade

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.

@rfredette rfredette changed the title [WIP] Bug 1905778: Fix inconsistent ingress operator status after upgrade Bug 1905778: Fix inconsistent ingress operator status after upgrade Jan 22, 2021
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 22, 2021
@rfredette
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 26, 2021
@openshift-ci-robot
Copy link
Contributor

@rfredette: This pull request references Bugzilla bug 1905778, 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.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla 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.

Copy link
Contributor

@Miciah Miciah left a comment

Choose a reason for hiding this comment

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

Please add to-do comments to remove this fix-up logic in 4.8. Once the operator has done the fix-ups, it shouldn't be necessary to perform the same fix-ups again, so we only need the fix-ups in one release (4.7) and don't need them in subsequent releases (4.8 and later).

Comment on lines 234 to 235
log.Info("EndpointPublishingStrategy missing LoadBalancer")
// set loadbalancer to external
Copy link
Contributor

Choose a reason for hiding this comment

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

The log message could be a little more explicit, and the comment is superfluous.

Suggested change
log.Info("EndpointPublishingStrategy missing LoadBalancer")
// set loadbalancer to external
log.Info("Setting default value for empty status.endpointPublishingStrategy.loadBalancer field", "ingresscontroller", ingress)

@Miciah
Copy link
Contributor

Miciah commented Jan 26, 2021

Thanks!
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 26, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah, rfredette

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 1a96d0a into openshift:master Jan 26, 2021
@openshift-ci-robot
Copy link
Contributor

@rfredette: All pull requests linked via external trackers have merged:

Bugzilla bug 1905778 has been moved to the MODIFIED state.

In response to this:

Bug 1905778: Fix inconsistent ingress operator status after upgrade

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.

@rfredette
Copy link
Contributor Author

/cherry-pick release-4.6

@openshift-cherrypick-robot

@rfredette: #526 failed to apply on top of branch "release-4.6":

Applying: Prune stale DeploymentDegraded status
Using index info to reconstruct a base tree...
M	pkg/operator/controller/ingress/status.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/operator/controller/ingress/status.go
CONFLICT (content): Merge conflict in pkg/operator/controller/ingress/status.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Prune stale DeploymentDegraded status
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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. bugzilla/severity-low Referenced Bugzilla bug's severity is low 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. 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

6 participants