-
Notifications
You must be signed in to change notification settings - Fork 338
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
Ensure ovnkube-controller does not go remote->local #3735
Conversation
637ba65
to
733e073
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would have benefited from a waitForValidZone
method somewhere
733e073
to
86f1559
Compare
At ovnkube-controller start up, it may attempt to start adding resources for a node that does not yet have its annotation, but should be considered local. This is especially the case in OpenShift when going from phase1 -> phase 2 upgrade and ovnkube-node on the node will annotate its zone id. In this case ovnkube-controller will start too early and program NBDB resources as remote for the node. Then when the node is annotated, it will program NBDB resources as local. Since we cannot be sure that all remote feature configuration in NBDB is removed when going from remote -> local we need to avoid this case. It also makes no sense to program NBDB when there are no nodes in the zone. This commit adds a wait to make sure at least one node in the cluster is in the ovnkube-controller's managed zone. Thanks @numansiddique for the idea. Signed-off-by: Tim Rozet <[email protected]>
86f1559
to
5e6787d
Compare
hmm I thought we spoke about local->remote here on friday, I was a bit confused about @trozet 's comment here: https://github.com/ovn-org/ovn-kubernetes/pull/3735/files#diff-cf3d012028107d0065b038f3ddf3f2fd82b14518b09aa7193b45bb5ef7eefebfR334 which mentions local -> remote but the title and description in the PR are focused on remote -> local, was about to talk to @trozet when he is back, but I guess its ok we merged this since its harmless. |
... unless there are no nodes! 😛 |
At ovnkube-controller start up, it may attempt to start adding resources for a node that does not yet have its annotation, but should be considered local. This is especially the case in OpenShift when going from phase1 -> phase 2 upgrade and ovnkube-node on the node will annotate its zone id. In this case ovnkube-controller will start too early and program NBDB resources as remote for the node. Then when the node is annotated, it will program NBDB resources as local.
Since we cannot be sure that all remote feature configuration in NBDB is removed when going from remote -> local we need to avoid this case. It also makes no sense to program NBDB when there are no nodes in the zone.
This commit adds a wait to make sure at least one node in the cluster is in the ovnkube-controller's managed zone.
Thanks @numansiddique for the idea.