kubernetes-sigs / cluster-api-provider-openstack

Cluster API implementation for OpenStack
https://cluster-api-openstack.sigs.k8s.io/
Apache License 2.0
299 stars 257 forks source link

flatcar-sysext template won't start without adding kustomize-deleted apiServerLoadBalancer #2202

Open cringdahl opened 1 month ago

cringdahl commented 1 month ago

/kind bug

What steps did you take and what happened: Executing clusterctl generate cluster --flavor flatcar-sysext results in a cluster failing with FloatingIPError.

$ clusterctl describe cluster test
NAME                                                     READY  SEVERITY  REASON                                              SINCE  MESSAGE                                                                                                  
Cluster/test                                             False  Error     FloatingIPError @ Machine/test-control-plane-tvr7h  41m    0 of 1 completed                                                                                          
├─ClusterInfrastructure - OpenStackCluster/test                                                                                                                                                                                                
└─ControlPlane - KubeadmControlPlane/test-control-plane  False  Error     FloatingIPError @ Machine/test-control-plane-tvr7h  41m    0 of 1 completed                                                                                          
  └─Machine/test-control-plane-tvr7h                     False  Error     FloatingIPError                                     41m    Obtaining management port for control plane machine failed: lookup management port for server 7d8c04 ...

The IP is pulled from the pool and assigned to the OpenStackCluster resource, but never actually assigns to anything.

This issue does not occur when using no --flavor. The only differences between no flavor (w/ Ubuntu) and using flatcar-sysext (w/ Flatcar) are the Flatcar-specific additions, and a lack of apiServerLoadBalancer in the Flatcar OpenStackCluster resource. Once I add that into a generated cluster yaml and apply it, the cluster comes back operational.

What did you expect to happen: Work right out of the box without having to add anything.

Anything else you would like to add: The spec: apiServerLoadBalancer portion is configured for deletion here, which is actively causing the issue.

Environment:

cringdahl commented 1 month ago

@zhangguanzhang why a thumbs down react?

tormath1 commented 3 days ago

@cringdahl Hey, I implemented the flatcar-sysext template and IIRC it was based on the template without-lb that would explain this issue.

Would you mind sending a PR to fix that? In the meantime I will try to repro. Thanks (and sorry for the delay)