Cause: Inconsistent output format for InstanceID() function. The function can get instance id either from metadata or from sending requests to the server. In the latter case, the result always has '/' prefix, and this is the correct format.
Consequence: If the instance ID was fetched from the metadata, the system fails to verify its node existence and fails with the error.
Fix: Fix the format of the result obtained from the metadata and include '/' prefix there, too.
Result: The system can always successfully verify a node existence since the instance ID format is correct in all cases.
Description of problem:
There appears to be an issue with the code from openstack_instances.go
It has a confusion around the number of "/" it should be using, this causes an error like this:
E0619 08:43:46.603838 1 node_lifecycle_controller.go:171] error checking if node prod-6fpdq-worker-0 exists: ProviderID "openstack://f2990d2e-8f63-4e08-85d2-106345456400" didn't match expected format "openstack:///InstanceID"
The code issue seems to be around this section:
|// instanceIDFromProviderID splits a provider's id and return instanceID.|
|---|
| | // A providerID is build out of '${ProviderName}:///${instance-id}'which contains ':///'.|
| | // See cloudprovider.GetInstanceProviderID and Instances.InstanceID.|
| | func instanceIDFromProviderID(providerID string) (instanceID string, err error) {|
| | // If Instances.InstanceID or cloudprovider.GetInstanceProviderID is changed, the regexp should be changed too.| <-------- CHECK THIS
| | var providerIDRegexp = regexp.MustCompile(`^` + ProviderName + `:///([^/]+)$`)|
| | |
| | matches := providerIDRegexp.FindStringSubmatch(providerID)|
| | if len(matches) != 2 {|
| | return "", fmt.Errorf("ProviderID \"%s\" didn't match expected format \"openstack:///InstanceID\"", providerID)|
| | }|
| | return matches[1], nil|
| | }|
Version-Release number of selected component (if applicable):
Openshift 4.4 on Openstack Stein
How reproducible:
Difficult, some clusters are affect some not
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Master Log:
Node Log (of failed PODs):
PV Dump:
PVC Dump:
StorageClass Dump (if StorageClass used by PV/PVC):
Additional info:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:4196
Comment 28Red Hat Bugzilla
2023-09-14 06:02:41 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days
Description of problem: There appears to be an issue with the code from openstack_instances.go It has a confusion around the number of "/" it should be using, this causes an error like this: E0619 08:43:46.603838 1 node_lifecycle_controller.go:171] error checking if node prod-6fpdq-worker-0 exists: ProviderID "openstack://f2990d2e-8f63-4e08-85d2-106345456400" didn't match expected format "openstack:///InstanceID" The code issue seems to be around this section: |// instanceIDFromProviderID splits a provider's id and return instanceID.| |---| | | // A providerID is build out of '${ProviderName}:///${instance-id}'which contains ':///'.| | | // See cloudprovider.GetInstanceProviderID and Instances.InstanceID.| | | func instanceIDFromProviderID(providerID string) (instanceID string, err error) {| | | // If Instances.InstanceID or cloudprovider.GetInstanceProviderID is changed, the regexp should be changed too.| <-------- CHECK THIS | | var providerIDRegexp = regexp.MustCompile(`^` + ProviderName + `:///([^/]+)$`)| | | | | | matches := providerIDRegexp.FindStringSubmatch(providerID)| | | if len(matches) != 2 {| | | return "", fmt.Errorf("ProviderID \"%s\" didn't match expected format \"openstack:///InstanceID\"", providerID)| | | }| | | return matches[1], nil| | | }| Version-Release number of selected component (if applicable): Openshift 4.4 on Openstack Stein How reproducible: Difficult, some clusters are affect some not Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Master Log: Node Log (of failed PODs): PV Dump: PVC Dump: StorageClass Dump (if StorageClass used by PV/PVC): Additional info: