On 11/9/26 4:47 AM, Ben Grande wrote:
Resolves: https://github.com/QubesOS/qubes-issues/issues/8196
Signed-off-by: Ben Grande <[email protected]>
---
  src/libxl/libxl_domain.c | 2 +-
  src/lxc/lxc_process.c    | 2 +-
  src/test/test_driver.c   | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 51dc3edcc2..808a8a333c 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -547,7 +547,7 @@ libxlDomainShutdownThread(void *opaque)
dom_event = virDomainEventLifecycleNewFromObj(vm,
                                             VIR_DOMAIN_EVENT_STOPPED,
-                                           VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN);
+                                           VIR_DOMAIN_EVENT_STOPPED_REBOOT);
          switch ((virDomainLifecycleAction) vm->def->onReboot) {
          case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY:
              libxlDomainShutdownHandleDestroy(driver, vm);
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 466ce07afd..b9fa21a815 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -727,7 +727,7 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitor 
*mon G_GNUC_UNUSED,
          priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_FAILED;
          break;
      case VIR_LXC_MONITOR_EXIT_STATUS_REBOOT:
-        priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
+        priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_REBOOT;

As mentioned in the V2 review, this is only used when virLXCProcessReboot() fails in virLXCProcessMonitorEOFNotify(). It seems odd to emit a 'stopped' event with 'reboot' detail when the reboot has failed. In addition, the code never consults the 'on_reboot' setting. IMO, best to leave this driver as is.

Regards,
Jim

          priv->wantReboot = true;
          break;
      default:
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 8546c3e251..fbde51f3e4 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2076,7 +2076,7 @@ static int testDomainReboot(virDomainPtr domain,
          testDomainShutdownState(domain, privdom, VIR_DOMAIN_SHUTOFF_SHUTDOWN);
          event = virDomainEventLifecycleNewFromObj(privdom,
                                           VIR_DOMAIN_EVENT_STOPPED,
-                                         VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN);
+                                         VIR_DOMAIN_EVENT_STOPPED_REBOOT);
if (!privdom->persistent)
              virDomainObjListRemove(privconn->domains, privdom);

Reply via email to