-
Notifications
You must be signed in to change notification settings - Fork 67
Prevent the bootstrapper to run kubeadm init on two nodes #99
Comments
I would like to work on this issue. |
To use the init-locker here I will need to create it using the Thank you. |
@ykakarap That would come from the static client. I think what you'd want to do in this case, as we aren't using the static clients, is to change that signature to the client found on the reconciler. I'll meet up with you and talk through it. |
@chuckha Thanks for the walkthrough. 😄 |
@fabriziopandini @chuckha I am acquiring the lock right before we start creating the bootstrap data for the init control plane. Ideally, we should release the lock after the Thoughts? |
/assign @ykakarap |
We should not be using an annotation here. We should be using the |
AFAIK
|
oh i see, that is defined in CAPI. ok, missed that. The TODO should be removed and we should import
Rest of this issue sounds good to me. |
I'm definitely not a fan of relying on annotations rather than fields, maybe we need to add a |
I'm +1 on adding |
I opened the linked issue above. |
I am wondering how the following situation needs to be handled: Let's say there are 2 control planes that are both trying to init. One of them will get the lock and will try to create the machine and do the init operation. Let's say while creating the machine it encountered an error because of some bad value in the yaml. This machine will try to reconcile over and over again but because of the bad yaml value it will never create. Because of this, the annotation will never be set. Since the first control plane was not created, should we allow the second control plane to try and init? Both the control planes (and any subsequent nodes) will be stuck in the reconcile loop with no progress. Now the question is: should we consider this behavior "working as expected" since the mistake was in a value in the yaml or should we have a mechanism that allows the second control plane to try to init if the first one fails. |
/milestone 0.1 |
@amy: You must be a member of the kubernetes-sigs/cluster-api-bootstrap-provider-kubeadm-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Cluster API Bootstrap Provider Kubeadm Maintainers and have them propose you as an additional delegate for this responsibility. 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. |
No interest in blocking @fabriziopandini. Follow on is fine. /milestone v0.1 |
Ok then 👍 . @chuckha @fabriziopandini I will raise a PR for this issue later today or tomorrow morning. |
/kind feature
Describe the solution you'd like
As discussed on #92
while the controlplane is not ready, the controller should requeue the second bootstrap control plane and try to join it after the controlplane gets ready.
That means that if by chance the second bootstrap control plane has a JoinConfiguration, then it will join (InitConfiguration and Clusterconfiguration will be ignored at this point); If the second bootstrap control plane has not JoinConfiguration the controller will error out and eventually update ErrorMessage/ErrorReason.
Anything else you would like to add:
The init-locker is already in the codebase, see #92; it is missing the plumbing into the controller
The text was updated successfully, but these errors were encountered: