public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v5 0/3] improve guest cleanup handling
Date: Fri, 15 May 2026 14:23:03 +0200	[thread overview]
Message-ID: <20260515122437.3153051-1-d.csapak@proxmox.com> (raw)

First we make the cleanup handling more consistent (1/3)
then we check explicitely for the backup lock to improve the error
message for stop backup mode (2/3)
and then we fix #7119 by waiting up to 30s for a possibly still running
guest to stop (e.g. this can occur when using usb passthrouh) (3/3)

changes from v4:
* only warn after 10 seconds exactly once, to indicate this is not a
  normal situation
* drop the 'waiting for xx seconds' from warning message

changes from v3:
* update version in preinst check
* add #DEBHELPER# to preinst
* consistently use /run/ instead of /var/run
* make get_cleanup_flag_path public and use that for mocking in tests
* style fixes
* use non-deprecated is_running helper
* improve warning message

changes from v2/RFC:
* use 'vm_running_locally' for getting the pid
* improve error messages
* use a 'use_old_cleanup' flag that will be auto-removed by a reboot
  to signal if we can use the new cleanup logic or the old


Dominik Csapak (3):
  cleanup: refactor to make cleanup flow consistent
  qm cleanup: die early when encountering a running stop mode backup
  fix #7119: qm cleanup: wait for process exiting for up to 30 seconds

 debian/preinst                   | 18 +++++++++++++
 src/PVE/CLI/qm.pm                | 43 ++++++++++++++++++++++++++++----
 src/PVE/QemuServer.pm            | 14 +++++++++++
 src/PVE/QemuServer/RunState.pm   | 29 +++++++++++++++++++++
 src/test/MigrationTest/QmMock.pm | 11 ++++++++
 5 files changed, 110 insertions(+), 5 deletions(-)
 create mode 100755 debian/preinst

-- 
2.47.3





             reply	other threads:[~2026-05-15 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 12:23 Dominik Csapak [this message]
2026-05-15 12:23 ` [PATCH qemu-server v5 1/3] cleanup: refactor to make cleanup flow consistent Dominik Csapak
2026-05-15 12:23 ` [PATCH qemu-server v5 2/3] qm cleanup: die early when encountering a running stop mode backup Dominik Csapak
2026-05-15 12:23 ` [PATCH qemu-server v5 3/3] fix #7119: qm cleanup: wait for process exiting for up to 30 seconds Dominik Csapak
2026-05-15 13:05 ` [PATCH qemu-server v5 0/3] improve guest cleanup handling Fiona Ebner

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=20260515122437.3153051-1-d.csapak@proxmox.com \
    --to=d.csapak@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal