abproute: Do not fail when a pod has bad gw config #4793
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting the
k8s.ovn.org/routing-network
pod annotation to an empty string on a pod that is not host-networked is the wrong configuration, and it has no effect on the OVN configuration. However, if an ovnkube-node pod is restarted, it is not able to go up and running as the above mentioned configuration triggers an error.Make the
abprout.Repair()
procedure resilient to bad user configuration, in order to improved the stability of the cluster.What this PR does and why is it needed
Setting the
k8s.ovn.org/routing-network
pod annotation to an empty string on a pod that is not host-networked is the wrong configuration, and it has no effect on the OVN configuration. However, if an ovnkube-node pod is restarted, it is not able to go up and running as the above mentioned configuration triggers an error.Make the
abprout.Repair()
procedure resilient to bad user configuration, in order to improved the stability of the cluster.Which issue(s) this PR fixes
Fixes #
https://issues.redhat.com/browse/OCPBUGS-37685
Special notes for reviewers
I'm not sure if there is a cleaner way to unit test this case. @jordigilh can you please review?
How to verify it
Steps to reproduce the problem are listed here
https://gist.github.com/zeeke/378842c9b64f02895ce0175172238c0c
Details to documentation updates
Description for the changelog
Does this PR introduce a user-facing change?