Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

Failure domains for multi-node CritControlPlane incorrect #1

@ChrisRx

Description

@ChrisRx

When creating a new CritControlPlane the expectation is that the new machines/nodes will be spread out over the available failure domains. Since all machines with cabpc are created simultaneously, the failure domain that is passed to the generated machines is the same one for all new machines/nodes. The expectation here is that these should be spread out over the available failure domains, so something like a NFailureDomainsWithFewestMachines will need to be applied here:

// TODO(chrism): replace with NFailureDomainsWithFewestMachines so that
// created control plane will be spread out over failure domains
fd := controlPlane.FailureDomainWithFewestMachines()
for i := 0; i < ccp.Spec.Replicas; i++ {
if err := r.cloneConfigsAndGenerateMachine(ctx, cluster, ccp, bootstrapSpec, fd); err != nil {
logger.Error(err, "failed to create initial control plane Machine")
r.recorder.Eventf(ccp, corev1.EventTypeWarning, "FailedInitialization", "Failed to create initial control plane Machine for cluster %s/%s control plane: %v", cluster.Namespace, cluster.Name, err)
return ctrl.Result{}, err
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions