Skip to content

Mismatch between ControlPlaneReady and Conditions.ControlPlaneReady #7099

@knabben

Description

@knabben

What steps did you take and what happened:
Running CAPD with tilt from HEAD, created a new runtime extension webhoook server and added the function hook for ControlPlaneInitialized, I wanted to execute a few steps AFTER the Cluster being ready, first try was to read from request.Cluster.Status.ControlPlaneReady boolean to check if I can create my pod in the WL cluster. This operations never happened even if the condition of Type ControlPlaneReady is True eventually.

E0820 17:11:02.074289      18 handlers.go:75] "Control plane not ready retrying."
phase Provisioned
controlplaneready false
infraready true
Ready False

// conditions
ControlPlaneInitialized True
ControlPlaneReady False
InfrastructureReady True

... repeats 8x

I0820 17:11:06.312747      18 handlers.go:55] "AfterControlPlaneInitialized is called."
E0820 17:11:06.312803      18 handlers.go:75] "Control plane not ready retrying."
phase Provisioned
controlplaneready false
infraready true

// conditions
Ready True
ControlPlaneInitialized True
ControlPlaneReady True
InfrastructureReady True

I0820 17:11:06.344126      18 handlers.go:55] "AfterControlPlaneInitialized is called."

In the last line request.Cluster.ControlPlaneReady == false, and all Conditions are true, as noted this does not happen to the InfrastructureReady.

Can this be for the fact I'm returning an ReponseStatusFailure while waiting for the cp be ready?

What did you expect to happen:
To both fields be in sync when the cp is ready.

Environment:

  • Cluster-api version: HEAD
  • minikube/kind version: 0.14.0
  • Kubernetes version: (use kubectl version): 1.24
  • OS (e.g. from /etc/os-release): Debian (WSL)

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APIkind/bugCategorizes issue or PR as related to a bug.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions