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

e2e: cloud-config secret can be removed before CAPO/CAPI resources being deleted #2110

Open
EmilienM opened this issue Jun 3, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@EmilienM
Copy link
Contributor

EmilienM commented Jun 3, 2024

/kind bug

What steps did you take and what happened:

In e2e, when tearing down the tests, we remove the namespace that was used.
In that namespace, there is the cloud-config secret that is used to store the OpenStack credentials.
If that secret is removed, some resources will fail to be reconciled by the cluster so deleting the namespace at the end of the tests is problematic if not everything was reconciled.

This could lead to this error:

E0601 02:15:54.144814       1 controller.go:329] "Reconciler error" err="secrets \"cluster-e2e-ljvg60-cloud-config\" not found" controller="openstackserver" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="OpenStackServer" OpenStackServer="e2e-ljvg60/cluster-e2e-ljvg60-control-plane-plgrj" namespace="e2e-ljvg60" name="cluster-e2e-ljvg60-control-plane-plgrj" reconcileID="588bbb5b-2d05-4391-833c-a2ef4eab3a32"

(Found via #2067)

I think until now we were lucky because all cluster resources were removed before the namespace gets deleted but with the new controller things might take a little bit more time and we found this issue again.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 3, 2024
@EmilienM
Copy link
Contributor Author

EmilienM commented Jun 3, 2024

I'm totally unsure if we'll actually fix that situation because CAPI framework waits for a cluster to be deleted as we can see here:
https://github.com/kubernetes-sigs/cluster-api/blob/e2bf2b7d108ecd51bf7b23bf50e2432e82d8f2fe/test/framework/cluster_helpers.go#L167-L177

However it seems like nothing waits for the OpenStackServers to be deleted in my initial implementation. I'll play around that for now.

@EmilienM
Copy link
Contributor Author

EmilienM commented Jun 3, 2024

/cc @mdbooth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: Inbox
Development

No branches or pull requests

2 participants