-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple subnet creation fails when zone is not specified #1779
Comments
/good-first-issue |
@Amulyam24: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
but how are we handling that for the first subnet when user didn't supply the zone?
|
We are fetching the zone from PowerVS zone - https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/main/cloud/scope/powervs_cluster.go#L1113-L1130 |
@Amulyam24 I would like to work on this issue |
/assign @Shilpa-Gokul |
There is logic written to use always the first one here -
wondering if we need a logic to use the subsequent vpc zone for the next subnet?! |
yes, we can try that out. |
We had a discussion regarding this issue and couple things decided are as follows
|
Also we can avoid fetching CIDR and use total ip while creating subnet, For more reference see vpc subnet code and discussion |
/kind bug
/area provider/ibmcloud
What steps did you take and what happened:
If zone it not specified while creating multiple subnets, second subnet creation will fail as the default address prefix is already assigned to the first subnet.
Spec:
Creation fails with
What did you expect to happen:
While creating multiple subnets, if subnet zone is missing from spec, don't proceed and instead throw an error.
Anything else you would like to add:
We can add a check to validate the spec before proceeding with cluster creation.
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: