-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🐛Race Condition where controller marks provisioned #12347
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
base: main
Are you sure you want to change the base?
Conversation
This PR is currently missing an area label, which is used to identify the modified component when generating release notes. Area labels can be added by org members by writing Please see the labels list for possible areas. 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9dcf6df
to
21b1255
Compare
test result of d290d64:
|
test: update LastTransitionTime right before calling reconciler test: deprecated status structure remove debugging logs
a2a4c58
to
a229543
Compare
/assign |
What this PR does / why we need it:
Error:
The controller returned ctrl.Result{} (no requeue) too early.
The test expects a requeue ctrl.Result{RequeueAfter: ...} until the provisioning duration has finished.
If res is equal to 0 then reconciliation will not be requeued, but it should be requeued and equal to 0.
if now < until then res != 0 and we requeue
if now >= until then res == 0 and we do not requeue (provisioned)
Problem:
Test setup took longer than provisioning duration causing the controller to think provisioning is completed when the test expected it to still be incomplete. Controller uses
LastTransitionTime
ofNodeProvisionedCondition
to determine if provisioning time is completed but this timestamp is out of date by the time test setup finishes.Fix:
Added a helper function that updates the
LastTransitionTime
to current time right before calling the reconciler. Note that the helper function handles both current and deprecated status structures because we are migrating in between API versions until approximately August 2026.Verification:
@mboersma and I ran this fix with a test script for multiple days and didn't get the error.
Which issue(s) this PR fixes:
Fixes #12301