Open jmkanz opened 1 month ago
Thanks for the details, I will see about getting a Openshift Jira bug open to resolve this issue.
Jira has been opened to track and resolve this issue. https://issues.redhat.com/browse/OCPBUGS-36185
I think this issue can be closed (cannot do so myself) in favor of the Jira.
ISSUE:
Currently, the IBM Cloud VPC API sets a default to return only 50 subnets per page on an API call if an option is not set on the API call to return more. However, a single VPC can have up to a maximum of 100 subnets.
If a user configures their machine provider config to look for a subnet that is greater than 50 in the returned list, the MAPI will return an error since it's using the default value of 50 provided by the VPC API.
POSSIBLE SOLUTIONS:
When using the IBM Cloud VPC API to return a subnet list, set the default limit to 100 so that all possible subnets are returned for the VPC. Such as:
subnetOption.SetLimit=100
https://cloud.ibm.com/apidocs/vpc/latest#list-subnetsSupport pagination if we choose to only return 50 results with the default setting
Additional Information: Here is the code where I believe we could set
subnetOption.SetLimit=100
to return the full result. This is also the code where the error is thrown if a subnet name provided in the machine provider config is over 50 in the returned list:Link: https://github.com/openshift/machine-api-provider-ibmcloud/blob/8c9ac909b36e619d75f59b073b4b056e5270ec54/pkg/actuators/client/client.go#L531