multipass
multipass copied to clipboard
Add `--force` argument to the `stop` command
Add a new parameter to force the shutdown instances (i.e., power down them).
Fixes #1909, Fixes #2492
Hey @luis4a0,
I know this is still in draft, but I always envisioned just adding a bool force
flag to shutdown()
and stop()
(it also can be argued that either shutdown()
or stop()
can be dropped altogether, but that's for a different day). That way, you are not having to duplicate any special handling or logic that you are currently doing if some of the force_shutdown()
implementations.
Codecov Report
Attention: Patch coverage is 64.70588%
with 18 lines
in your changes are missing coverage. Please review.
Project coverage is 88.85%. Comparing base (
697e2f5
) to head (45dcacd
).
Files | Patch % | Lines |
---|---|---|
src/daemon/daemon.cpp | 8.33% | 11 Missing :warning: |
...tform/backends/libvirt/libvirt_virtual_machine.cpp | 36.36% | 7 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1946 +/- ##
==========================================
- Coverage 88.89% 88.85% -0.04%
==========================================
Files 254 254
Lines 14081 14118 +37
==========================================
+ Hits 12517 12545 +28
- Misses 1564 1573 +9
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey @townsend2010, thanks a lot for your comment! What you propose makes complete sense, I'll finish testing if the commands I used indeed work to turn off VM's and then rework the code.
Added a few small changes; mostly refactoring with the current state of main
and some wiring that got missed.
Fixes #2492
and
#2693 can be closed as its no longer needed
Once this is in, I think we should also change delete
such that running instances get force-stopped if a regular stop
is not enough. I don't think it makes a lot of sense for deleted instances to keep running...