-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 Fix the description of ControlPlaneInitializedCondition is misleading #6999
🐛 Fix the description of ControlPlaneInitializedCondition is misleading #6999
Conversation
|
Welcome @13164815445! |
Hi @13164815445. 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. |
[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 |
/easycla |
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.
/ok-to-test
/retest |
I'm re-running the tests in case there's a flake, but I think the implementation here doesn't match the path laid out in #4936. @13164815445 there's a guide to running the end to end tests locally in the Cluster API book if you want to drill down on what the root cause of the test failure is. |
I think we cannot just remove setting the condition because, as Vince mentioned, the two codepaths are mutual exclusive. cluster-api/controllers/cluster_controller.go Lines 477 to 482 in 7f879be
Will get executed when not using a ControlPlane provider cluster-api/controllers/cluster_controller_phases.go Lines 238 to 247 in bfc6f80
Otherwise. So we still need both codepaths if I got it right. Would be great to replicate the issue, check which of both codepaths is executed in the described case of the issue and check what could be done to only mark it to true if is okay to do so. |
This is my problem, I didn't take into account the difference between setting and not setting controlplaneref I want to add machine judgment in the reconcileControlPlane method, but I am not sure if there is a control plane machine in the scene if ControlPlaneRef is not nil |
I think you are right, we still need both codepaths If ControlPlaneInitializedCondition only means that the control plane is available, then it is correct now, I am wondering if I just need to change the comment If a machine must be guaranteed to be available, then we must ensure that controlplaneref is not nil, and the control plane machine must exist |
42d1bb7
to
7e8d978
Compare
@@ -59,7 +59,7 @@ const ( | |||
|
|||
const ( | |||
// ControlPlaneInitializedCondition reports if the cluster's control plane has been initialized such that the | |||
// cluster's apiserver is reachable and at least one control plane Machine has a node reference. Once this | |||
// cluster's apiserver is reachable or at least one control plane Machine has a node reference. Once 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.
Don't change v1alpha4
// cluster's apiserver is reachable or at least one control plane Machine has a node reference. Once this | ||
// condition is marked true, its value is never changed. See the ControlPlaneReady condition for an indication of | ||
// the current readiness of the cluster's control plane. |
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.
Agreed we should be able to leave the condition as is and update the comment instead. @13164815445 WDYT about:
// cluster's apiserver is reachable or at least one control plane Machine has a node reference. Once this | |
// condition is marked true, its value is never changed. See the ControlPlaneReady condition for an indication of | |
// the current readiness of the cluster's control plane. | |
// cluster's apiserver is reachable. If no Control Plane provider is in use this condition reports that at least one control plane Machine has a node reference. Once this | |
// condition is marked true, its value is never changed. See the ControlPlaneReady condition for an indication of | |
// the current readiness of the cluster's control plane. |
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 |
The Kubernetes project currently lacks enough active 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 rotten |
@13164815445 do you think you'll have time to come back to this PR? If not we can close and let someone else pick it up. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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. |
…ncileControlPlane
What this PR does / why we need it:
cluster ControlPlaneInitializedCondition reports if the cluster's control plane has been initialized such that the cluster's apiserver is reachable and at least one control plane Machine has a node reference,
but in the scenario where ControlPlaneRef is not nil, we cannot determine whether there is a control plane machine, and we can only judge by the ControlPlaneInitializedCondition of the control plane, so I think it is necessary to modify the description of cluster ControlPlaneInitialized
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 #4936