-
Notifications
You must be signed in to change notification settings - Fork 140
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
Namespace migration - Fix potential namespace migration problem with one node cluster #3188
Conversation
I think this checks out, but @tmjd knows the logic here a bit better than I do. |
/sem-approve |
@tmjd Hi! Could you please take a look? Thank you! |
104891e
to
220227a
Compare
220227a
to
5fe6538
Compare
/sem-approve |
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.
LGTM
Thank you for this fix @mihivagyok |
Description
kind/bug
The following can happen with a 1 node cluster:
kube-system/calico-node
with node selector - that is successfulkube-system/calico-typha
to 0:kube-system/calico-node
goes to CrashLoopBackOff already and operator stuck into this state: it tries to calculate ready and desired calico-nodes, but it fails the math, that's why it does not continue - the calculation in function waitUntilNodeCanBeMigrated() does not work (ksR, ksD, csR, csD).Then once we add label
projectcalico.org/operator-node-migration=migrated
label to the node, it can continue.This behaviour can be triggered if
minReadySeconds: 15
is set fortyphaDeployment
in the Installation CR.Please note that sometimes this can happen faster:
That's why add this simple logic which has effect only on 1 node clusters.
Change is well-tested (namespace migration is built into our CI process, so dozens tests are executed)
I would like to cherry pick this change to 1.32 and 1.33 if possible. Thanks!
For PR author
make gen-files
make gen-versions
For PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bug
if this is a bugfix.kind/enhancement
if this is a a new feature.enterprise
if this PR applies to Calico Enterprise only.