Skip to content
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

IBM Cloud Infrastructure provisioning fails to find an existing VPC when provided #2140

Open
cjschaef opened this issue Jan 21, 2025 · 0 comments
Labels
area/provider/ibmcloud Issues or PRs related to ibmcloud provider kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@cjschaef
Copy link
Contributor

cjschaef commented Jan 21, 2025

/kind bug
/area provider/ibmcloud

What steps did you take and what happened:
[A clear and concise description of what the bug is.]
When attempting to provide an existing VPC for IBM Cloud Infrastructure provisioning, CAPI still attempts to create a new VPC, with the same name, thus failing due to name collision.

time="2024-12-26T10:40:07Z" level=debug msg="E1226 10:40:07.335078 482 ibmvpccluster_controller.go:241] \"failed to reconcile VPC\" err=\"failed to create vpc: error creating vpc: Provided Name (ci-op-ty2xb467-e5b9a-vpc) is not unique\"

What did you expect to happen:
CAPI will use the existing VPC to provision Infrastructure resources in, rather than attempting to create a new VPC.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
The issue occurs when the VPC ID that gets found, but fails to get returned.

The ID is not returned here, after it was found

// Check if the VPC was found and has an ID
if vpcDetails != nil && vpcDetails.ID != nil {
// Set VPC ID in Status to shortcut future lookups
s.SetResourceStatus(infrav1beta2.ResourceTypeVPC, &infrav1beta2.ResourceStatus{
ID: *vpcDetails.ID,
Name: s.NetworkSpec().VPC.Name,
Ready: true,
})
}

Environment:

  • Cluster-api version: v0.9.0
  • Minikube/KIND version: n/a
  • Kubernetes version: (use kubectl version): v1.32
  • OS (e.g. from /etc/os-release): ubuntu nobel
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/provider/ibmcloud Issues or PRs related to ibmcloud provider labels Jan 21, 2025
cjschaef added a commit to cjschaef/cluster-api-provider-ibmcloud that referenced this issue Jan 21, 2025
Fix bug where an existing VPC ID that was found, was not
being returned, resulting in attempts to recreate the
VPC.

Related: kubernetes-sigs#2140
k8s-ci-robot pushed a commit that referenced this issue Jan 22, 2025
Fix bug where an existing VPC ID that was found, was not
being returned, resulting in attempts to recreate the
VPC.

Related: #2140
@mkumatag mkumatag added this to the v0.10.0 milestone Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/ibmcloud Issues or PRs related to ibmcloud provider kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants