kubernetes / cloud-provider-openstack

Apache License 2.0
623 stars 611 forks source link

[occm]OpenStack endpoints can not be reinitialized automatically #2704

Closed YuShangbin closed 1 week ago

YuShangbin commented 3 weeks ago

/kind bug

What happened: When the occm initializes OpenStack endpoint before OpenStack Service is ready, the endpoint may be initialized failed. But after the Service is ready, occm can not reinitialize the endpoint automatically, which lead call API failed.

What you expected to happen: The occm can have a mechanism to reinitialize endpoints when the Service status updates.

How to reproduce it:

  1. Install occm
  2. Install OpenStack Service
  3. Call Openstack Service API

Anything else we need to know?: None

Environment:

YuShangbin commented 2 weeks ago

@dulek @kayrus @zetaab Hi, can you give some advice about this problem? thks.

kayrus commented 2 weeks ago

@YuShangbin Hi, thanks for the issue. Unfortunately I don't understand the problem description.

What does "OpenStack Service is ready" mean? There is an endpoint in the token catalog, but the service doesn't respond?

call API failed

can you provide an example?

In any case, this issue seems to relate more to Gophercloud than to OCCM.

YuShangbin commented 2 weeks ago

@kayrus For example, install occm and call LB API before install OpenStack Octavia Service, there is no LB endpoint in the catalog,occm will initialize LB client failed and then call LB API failed. Even install Octavia Service later, occm can not intialize LB client again, so still call LB API failed.

kayrus commented 2 weeks ago

If there is no LB endpoint, the OCCM must fail and exit. K8s must restart the failed pod until the catalog service endpoint is available. Let me know if this is not true.

YuShangbin commented 2 weeks ago

The occm will fail and pass, but not exit.

YuShangbin commented 2 weeks ago

@kayrus Thanks for your reply! If we need check if all OpenStack services in occm have this problem, and give a common resolution?