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

[daemon] need to kill misbehaving instances on stop #1167

Closed
Saviq opened this issue Nov 5, 2019 · 5 comments · Fixed by #1946
Closed

[daemon] need to kill misbehaving instances on stop #1167

Saviq opened this issue Nov 5, 2019 · 5 comments · Fixed by #1946
Assignees
Labels
enhancement medium medium importance

Comments

@Saviq
Copy link
Collaborator

Saviq commented Nov 5, 2019

When an instance doesn't stop, a multipass stop command happily exits, when the instance actually continues to run.

We need to apply a timeout, after which we let the user know that the instance didn't stop, and maybe add a --force option to multipass stop so that it gets killed instead after the timeout.

This is at least the case on QEMU.

@townsend2010
Copy link
Contributor

This is easily reproduced by issuing halt inside a running instance. halt only takes the OS down to runlevel 0, but does not issue an ACPI poweroff. This causes the hypervisor to continue to run. It's actually no different than issuing a halt on a machine itself where the machine will not poweroff.

@townsend2010
Copy link
Contributor

I will say too, that this can lead to the daemon being in a bad state since it thinks the instance is running and has a valid IP address where in fact, the instance is not really running.

@jbosse
Copy link

jbosse commented Feb 16, 2022

Is there a workaround to kill an instance in this state?

[Edit] I killed qemu and that at least allowed me to start Multipass and the instance again.

@Saviq
Copy link
Collaborator Author

Saviq commented Feb 16, 2022

@jbosse ultimate hammer is always sudo kill -9 the qemu process.

@townsend2010 townsend2010 added this to the v1.10.0 milestone Jul 1, 2022
@townsend2010
Copy link
Contributor

This particularly needs fixing now that instance modification is possible and it's possible to overcommit resources to an instance, making it unbootable yet unstoppable.

@townsend2010 townsend2010 removed this from the v1.10.0 milestone Jul 1, 2022
@townsend2010 townsend2010 linked a pull request Apr 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement medium medium importance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants