qubesos: add force parameter to shutdown and restarted states#40
Merged
Conversation
9c0c36f to
3e6e00e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
==========================================
+ Coverage 83.64% 83.72% +0.07%
==========================================
Files 1 1
Lines 214 215 +1
==========================================
+ Hits 179 180 +1
Misses 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Exposes qubesadmin.vm.QubesVM.shutdown(force=True) through a new module parameter. When force: true is set alongside state: shutdown (or state: restarted), the target VM halts gracefully regardless of whether other VMs are connected to it (e.g. AppVMs using it as a netvm). This matches the semantics of qvm-shutdown --force on the CLI. Distinct from state: destroyed, which calls vm.kill() (a SIGKILL of the Xen domain with no graceful shutdown). The force parameter only skips the "connected domains" precondition; the target itself still halts gracefully, as it does with state: shutdown today. The default is force=false, preserving current behavior. Adds a pytest case in tests/qubes/test_module.py that exercises the new parameter against a running dependent VM. Refs: QubesOS/qubes-issues#10856 Co-authored-by: Guillaume Chinal <guiiix@invisiblethingslab.com>
Member
Author
|
Thanks! Rebase done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is based on the original work from @jmynes in PR #36 rebased on top of the current main branch.
The
forceparameter is added to both legacyqubesosandqubesos.core.qubemodules.Thanks to @jmynes for the original contribution.