Allow qube to reboot upon its request - #810
ben-grande wants to merge 3 commits into
Conversation
f85154d to
642d09a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #810 +/- ##
==========================================
- Coverage 70.75% 70.62% -0.13%
==========================================
Files 61 61
Lines 14456 14501 +45
==========================================
+ Hits 10229 10242 +13
- Misses 4227 4259 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6649f40 to
fe4ddb3
Compare
|
Besides the time threshold to allow a consecutive reboot, if we are worried about revisions, there could be an "ask/prompt" mode, that when a qube wants to reboot, it shutsdown, and a dom0 prompts asks the user if they allow a qube restart to happen. |
c68c8de to
1643b74
Compare
|
Could |
|
Yes. |
|
Nice. I might be too paranoid about this, but I'll probably want to disable it globally on my system (except for a few VMs) in case there's ever some mass infection event of VMs with a Qubes OS specific wiper discarding revisions overnight (when even an hours long threshhold would not be enough). |
|
I haven't decided on the default yet. This is difficult, cause there is no good way to prevent throwing up all volumes, without sacrificing usability. Let's say you have Now let's say we'd want to limit by But on Windows installation, at least a dozen reboots happened. |
Generally it's 1, although the installer overrides it to 2 for the LVM layout's default pool (so indeed for most people 2 turns out to be the default in practice): QubesOS/qubes-issues#10152 (comment) Edit: oh you had already commented in that thread, I forgot.
Haha wow. |
I meant to write half a dozen, but still, more than anyone would set for |
c08b594 to
4eefe0a
Compare
As each shutdown generates a revision depending on the volume "revisions_to_keep" property, if "rebootable=True", it is possible for it to throw all sane volumes away, in case of malicious or unintentional reboot loops, therefore the "rebootable_threshold" was added to limit the risks. The only 0 risk method is disable "rebootable", cause there is no way to discern the reboot from being benevolent or malevolent. Limiting the reboot threshold with the "revision_to_keep" value was considered, but it is very limiting, as the default value is two, and if we want to preserve one good revision, we'd only be able to reboot once and the next start still could be impacted by the qube requesting the qube to reboot again (which would just shutdown) or requesting shutdown, thus two revisions are wasted. Fixes: QubesOS/qubes-issues#8196
Specifically, VIR_DOMAIN_EVENT_ID_REBOOT. As the callback handler has a different signature and it is passed as positional parameters instead of keywords, use a new callback method and make it reusable for future addition of events.
|
PipelineRetryFailed |
|
openQArun TEST=system_tests_misc PR_LABEL=openqa-group-1 |
Fixes: QubesOS/qubes-issues#8196
Requires: QubesOS/qubes-core-libvirt#53
TODO: