Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore 422 Unprocessable Entity on KLB patching
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
- Loading branch information
Showing
1 changed file
with
38 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters