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

Option to Shutdown VM before deleting it #1973

Open
shaardie opened this issue Mar 27, 2024 · 5 comments
Open

Option to Shutdown VM before deleting it #1973

shaardie opened this issue Mar 27, 2024 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@shaardie
Copy link

/kind feature

Describe the solution you'd like

I think the teardown process of VMs would benefit from an option to shutdown the OpenStack Machine before deleting it. This way it would be possible to benefit from teardown process in the VMs itself. Myself encountered this problem with NVIDIA licensees, which are borrowed on VM startup, but never properly released, because the Service on the VM was never stopped properly and therefore had no chance of releasing the license.

I think on way of implementing this, would be to add something like an waitForShutdown to the OpenStackMachine CRD. It could be defaulted to 0s to keep the old behavior and it would be a single configuration to have the possibility to let the VM properly shutdown and have a timeout for the shutdown, so that it does not hang forever in an error case.

If you are interested in such a feature, I would be happy to help implementing it.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 27, 2024
@mdbooth
Copy link
Contributor

mdbooth commented Mar 27, 2024

Sounds useful.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 25, 2024
@EmilienM
Copy link
Contributor

@shaardie sounds like useful indeed. Would you still be interested to implement it?

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 25, 2024
@vring0
Copy link

vring0 commented Jul 8, 2024

+1

shaardie pushed a commit to shaardie/cluster-api-provider-openstack that referenced this issue Sep 16, 2024
Tries to shutdown the OpenStack VM before deleting it. This way even
Pods form Daemonsets are shut down more gracefully and services like
license daemons on the VMs can be properly shutdown.

Related to
kubernetes-sigs#1973,
but implemented for an older version.
@shaardie
Copy link
Author

I would like to implement it, but unfortunately there is a big leap between main and the version we are currently using (0.9). Especially, because there seems to be a new controller.

As a quick fix, at least for us, I implemented this on the release-0.9 branch.

As soon as the dust settles and we can switch to a version near the current main, I would try to implement it there again.

shaardie pushed a commit to shaardie/cluster-api-provider-openstack that referenced this issue Sep 26, 2024
Tries to shutdown the OpenStack VM before deleting it. This way even
Pods form Daemonsets are shut down more gracefully and services like
license daemons on the VMs can be properly shutdown.

Related to
kubernetes-sigs#1973,
but implemented for an older version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Status: Inbox
Development

No branches or pull requests

6 participants