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

[release-4.6] Bug 1968418: Fixing bug, Kuryr-Controller crashes when it's missing the status #519

Conversation

dulek
Copy link
Contributor

@dulek dulek commented Jun 7, 2021

Cherry pick of #501.

This patch is fixing the bug in which was problem after the status
field is deleted, kuryr-controller is crashing because of it.
So we need to check if status field is missing and add it to the
crd.
Also I add there fixes of another parts of code where probably
in the future could be similar problem is some parts of the CRD
would be missing.

Closes-Bug: #1921109
Change-Id: Ib195aa4389e310354f163d3ba474eddea18c4f51
@openshift-ci openshift-ci bot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium 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 Jun 7, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 7, 2021

@dulek: This pull request references Bugzilla bug 1968418, which is invalid:

  • expected dependent Bugzilla bug 1949541 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA instead
  • expected dependent Bugzilla bug 1933880 to target a release in 4.7.0, 4.7.z, but it targets "4.8.0" 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:

[release-4.6] Bug 1968418: Fixing bug, Kuryr-Controller crashes when it's missing the status

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 gryf and MaysaMacedo June 7, 2021 11:28
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2021
@dulek
Copy link
Contributor Author

dulek commented Jun 7, 2021

/hold

I bet I should test this first, the cherry-pick wasn't trivial.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 7, 2021
@dulek
Copy link
Contributor Author

dulek commented Jun 16, 2021

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2021

@dulek: This pull request references Bugzilla bug 1968418, which is invalid:

  • expected dependent Bugzilla bug 1933880 to target a release in 4.7.0, 4.7.z, but it targets "4.8.0" 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:

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

@dulek
Copy link
Contributor Author

dulek commented Jun 16, 2021

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2021

@dulek: This pull request references Bugzilla bug 1968418, 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.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.z) matches configured target release for branch (4.6.z)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1949541 is in the state CLOSED (ERRATA), which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 1949541 targets the "4.7.z" release, which is one of the valid target releases: 4.7.0, 4.7.z
  • bug has dependents

Requesting review from QA contact:
/cc @eurijon

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.

@openshift-ci openshift-ci bot 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 Jun 16, 2021
@openshift-ci openshift-ci bot requested a review from eurijon June 16, 2021 13:42
@dulek
Copy link
Contributor Author

dulek commented Jun 16, 2021

/test images

@dulek dulek force-pushed the cherry-pick-501-to-release-4.6 branch from 342c28a to bab929b Compare June 17, 2021 10:08
@dulek
Copy link
Contributor Author

dulek commented Jun 17, 2021

Ha, good I tested this, I made quite a mistake resolving conflicts.

If we're in the process of handling a KuryrLoadBalancer event and
somebody's tries to delete the `.status` field there, any update we do
on `.status` will result in 422 Unprocessable Entity returned from K8s
API. There's no sense in failing kuryr-controller in that case as the
update should trigger another event and Kuryr should be able to recover
by discovering all the resources and filling the status again.

This commit fixes that by making sure in such situation we stop
processing the event and make the handler wait for the next one.

As a consuequence KLB's 404 returned from patch operations is also
handled as hard stop for further processing of the KuryrLoadBalancer as
there's no point in creating or deleting Octavia resources if the LB is
destined to be cascade deleted.

Change-Id: I5dabded04302268e2c5c25f6c31a5619cd0c28e1
Closes-Bug: 1921109
@dulek dulek force-pushed the cherry-pick-501-to-release-4.6 branch from bab929b to f9d2018 Compare June 17, 2021 10:26
@dulek
Copy link
Contributor Author

dulek commented Jun 17, 2021

/hold cancel

Alright, this seems to work now.

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 17, 2021
@MaysaMacedo
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Jun 17, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek, MaysaMacedo

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

@mfojtik mfojtik added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jun 18, 2021
@mfojtik
Copy link
Member

mfojtik commented Jun 18, 2021

[patch-manager] 🚀 Approved for z-stream by score: 0.70

approved

@openshift-merge-robot openshift-merge-robot merged commit 7feb5bd into openshift:release-4.6 Jun 18, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 18, 2021

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

Bugzilla bug 1968418 has been moved to the MODIFIED state.

In response to this:

[release-4.6] Bug 1968418: Fixing bug, Kuryr-Controller crashes when it's missing the status

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-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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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