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
Add watch on cluster.status.infrastructureReady to reconcile vsphereMachine when cluster infrastructure is ready #1212
Conversation
Welcome @mrajashree! |
Hi @mrajashree. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
deferring to the CAPV maintainers: |
/ok-to-test |
conditions.MarkFalse(ctx.VSphereMachine, infrav1.VMProvisionedCondition, infrav1.WaitingForClusterInfrastructureReason, clusterv1.ConditionSeverityInfo, "") | ||
return reconcile.Result{}, nil | ||
return reconcile.Result{RequeueAfter: 30*time.Second}, nil |
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.
Should we have a watch here instead of requeueing?
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.
@vincepri oh you mean just like there's a watch on Cluster for the VSphereCluster object, we should add one mapping Cluster to VSphereMachine?
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.
Yeah if we're waiting for it, we probably should add watch instead of using RequeueAfter
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.
oh looks like there is a watch for Cluster, just need to update the predicate to check for this
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 tested changing the update predicate for the watch on Cluster but I see the same, machines reconcile after a while. I'll see if I missed something and test again. Only requeuing seems to work
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.
The watch on cluster object's infrastructureReady field change wasn't working because it wasn't enqueuing the vsphereMachine object. Opened a PR for that #1306
With the change in clusterToVsphereMachine mapper, updating the watch on cluster object to enqueue vsphereMachine when cluster.status.infrastructureReady becomes true works. I'll rebase this PR when the other one is merged
Retriggering, seems to be an unrelated failure |
/test pull-cluster-api-provider-vsphere-e2e |
/assign @srm09 |
/retest |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@mrajashree: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
ede6c0a
to
57ce67e
Compare
Updated the PR to replace predicates on cluster watch with ClusterUnpausedAndInfrastructureReady |
/lgtm |
/remove-lifecycle stale |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: srm09 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
After
clusterctl move
for self-managed CAPV clusters, worker machines take around 10-15 minutes to go to "Running" phase.It could be due to the following reasons:
clusterctl move
, the Status fields are removed. So none of the CAPI objects retain the status fields, including the Cluster object. Once the Cluster.Spec.Paused field is unset after move, controllers begin to reconcile and the status fields get set again.Cluster.Status.InfrastructureReady
field before proceeding, which will befalse
immediately after the move until the cluster controller has reconciled & updated it.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1211
Release note: