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

GetInstanceStatusByName doesn't return an error when > 1 instance if found #2088

Closed
EmilienM opened this issue May 16, 2024 · 4 comments · Fixed by #2109
Closed

GetInstanceStatusByName doesn't return an error when > 1 instance if found #2088

EmilienM opened this issue May 16, 2024 · 4 comments · Fixed by #2109
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@EmilienM
Copy link
Contributor

/kind bug

What steps did you take and what happened:

GetInstanceStatusByName doesn't return an error when > 1 instance if found and this can lead to cluster problems if we have two instances with the same name. Could be a leftover or a staled resource, that needs to be removed before creating a new one.

What did you expect to happen:

An error should be returned.

Environment:

  • Cluster API Provider OpenStack version (Or git rev-parse HEAD if manually built): latest
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 16, 2024
@EmilienM
Copy link
Contributor Author

/assign EmilienM

@EmilienM
Copy link
Contributor Author

@mdbooth so in the current state of things, if two instances have the same name, cleanup will never happen. This will likely change once we have the OpenStackServer controller that I'm working on at the moment; so I wonder if we want to provide a "fix" for this into 0.10 or if we're fine with that behaviour now and we'll improve with the new controller.

@mdbooth
Copy link
Contributor

mdbooth commented May 16, 2024

I think if we have 2 instances with the same name and can't distinguish between them we're just going to have to report an error to the user. I'm not sure we can safely do anything about it, now or with OpenStackServer.

@EmilienM
Copy link
Contributor Author

ok so i'll submit a PR that just reports an error for now, gotcha.

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: Done
Development

Successfully merging a pull request may close this issue.

3 participants