kubernetes-sigs / cluster-api-provider-openstack

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

LoadBalancerMember cannot be reconciled #738

Closed hidekazuna closed 3 years ago

hidekazuna commented 3 years ago

/kind bug

What steps did you take and what happened:

I tried to create workload cluster using external-cloud-provider flavor. When creating loadbalancer member, subnet not found error occurred.

E0209 05:29:39.724528       1 openstackmachine_controller.go:396] controllers/OpenStackMachine "msg"="LoadBalancerMember cannot be reconciled: error create lbmember: Bad request with: [POST http://controller.hidekazuna.test:9876/v2.0/lbaas/pools/1e48273e-55c3-4815-bf10-257fa7ef2949/members], error message: {\"faultcode\": \"Client\", \"faultstring\": \"Subnet 6a85b569-8b3a-44e6-83cd-d61545e9af57 not found.\", \"debuginfo\": null}" "error"="UpdateError" "cluster"="external" "machine"="external-control-plane-rg7h2" "namespace"="default" "openStackCluster"="external" "openStackMachine"="external-control-plane-qhnbq"

What did you expect to happen:

loadbalancer members are created successfully.

Anything else you would like to add:

Environment:

hidekazuna commented 3 years ago

Few days ago I updated Octavia ubuntu package and Validate resource access when creating loadbalancer or member was introduced. Now octavia checks if new subnet can be seen from octavia context. Then subnet not found error occurred.

This commit was backported to rokcy, stein, and train. So releases newer than or equal to rocky should all result in error.

We can avoid the error by add the following setting in octavia.conf.

[networking]
...
allow_invisible_resource_usage = True