all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 2/3] systemd: vmid.scope: add orderings to fix dbus-vmstate cleanup (regression)
Date: Wed, 17 Dec 2025 14:17:11 +0100	[thread overview]
Message-ID: <20251217131724.118681-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20251217131724.118681-1-f.ebner@proxmox.com>

Fixes bug #7092 as well as a regression [0] in combination with HA
shutdown policy 'migrate' caused by commit 1f2c5146 ("migrate: remove
left-over dbus-vmstate instance when migrating without conntrack
state"). Currently, the HA migrations do not migrate the conntrack
state and before this patch, the dbus.service is stopped too early
during shutdown, before the LRM migrations. This led to failure when
trying to check for a left-over dbus-vmstate instance, because
the Net::DBus->system() call would fail.

It is not enough to record the After=dbus.service dependency, because
systemd would already stop the vmid.scope even while processes in it
are still running. Add a Before=pve-ha-lrm.service and for consistency
Before=pve-guests.service to record the ordering on shutdown. This
ensures that the scope units are still around until the LRM or guests
service had the chance to stop, and usually, handle the remaining
running guests itself.

[0]: https://forum.proxmox.com/threads/169739/post-825256

Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=7092
Co-developed-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Co-developed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuServer.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index d634251b..69991843 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -5718,6 +5718,10 @@ sub vm_start_nolock {
         KillMode => 'process',
         SendSIGKILL => 0,
         TimeoutStopUSec => ULONG_MAX, # infinity
+        After => ['dbus.service'],
+        # The point is ordering the VMID.scope after these during stop.
+        # During start-up, the slice/scopes are not enabled.
+        Before => ['pve-ha-lrm.service', 'pve-guests.service'],
     );
 
     if (PVE::CGroup::cgroup_mode() == 2) {
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

  parent reply	other threads:[~2025-12-17 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17 13:17 [pve-devel] [PATCH-SERIES common/qemu-server 0/3] fix #7092: " Fiona Ebner
2025-12-17 13:17 ` [pve-devel] [PATCH common 1/3] systemd: enter scope: allow specifying 'Before' and 'After' properties Fiona Ebner
2025-12-17 13:17 ` Fiona Ebner [this message]
2025-12-17 13:17 ` [pve-devel] [PATCH qemu-server 3/3] dbus-vmstate: guard more errors in qemu_del_dbus_vmstate() Fiona Ebner
2025-12-17 14:05 ` [pve-devel] [PATCH-SERIES common/qemu-server 0/3] fix #7092: systemd: vmid.scope: add orderings to fix dbus-vmstate cleanup (regression) Maximiliano Sandoval
2025-12-17 14:16 ` [pve-devel] applied-series: " Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251217131724.118681-3-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal