From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH guest-common/container/qemu-server/manager v2 0/6] fix #4474: stop tasks may overrule shutdown tasks
Date: Wed, 3 Apr 2024 08:55:55 +0200 [thread overview]
Message-ID: <c4c1a37f-1093-47cd-b0a0-d6e0b387fb4b@proxmox.com> (raw)
In-Reply-To: <20240130171057.438025-1-f.weber@proxmox.com>
ping -- still applies.
On 30/01/2024 18:10, Friedrich Weber wrote:
> As reported in #4474 [0], a user may attempt to shutdown a VM/CT,
> realize that it is unresponsive, and decide to stop it instead. If the
> shutdown task has not timed out yet, the stop task will fail. The user
> needs to manually abort the shutdown task before stopping the VM,
> which is inconvenient.
>
> With this patch series, a stop task can optionally overrule active
> shutdown tasks.
>
> Summary of changes:
>
> * Backend:
> ** In the LXC status API handlers, we move config locking from the API
> handlers into workers to avoid blocking, as suggested by Wolfgang on v1.
> ** We add a new optional `overrule-shutdown` parameter to
> VM/CT `/stop` endpoints. If it is 1, we query for active
> `qmshutdown`/`vzshutdown` tasks by the current user for the given
> VMID, and abort them before attempting to stop the VM/CT.
> * Frontend: Issuing a stop command shows a confirmation message box that, if an
> active shutdown task for that guest is detected, shows a default-on checkbox
> that offers to overrule active shutdown tasks. If it is checked, the API
> request is sent with `overrule-shutdown=1`.
>
> Tested with a hung CentOS 7 container and a SeaBIOS VM without a bootable disk.
>
> Changes v1 -> v2:
> * fixed patch ordering, as suggested by Wolfgang on v1
> * added a pve-container patch that moves config locking from API handlers
> into workers for start/stop/shutdown/suspend, as suggested by Wolfgang on v1
> * instead of showing a second modal dialog when stopping a guest, show a "guest
> stop" message box that has an optional checkbox offering to overrule shutdown
> tasks
> * split pve-manager patch in two
>
> [0]: https://bugzilla.proxmox.com/show_bug.cgi?id=4474
>
> guest-common:
>
> Friedrich Weber (1):
> guest helpers: add helper to overrule active tasks of a specific type
>
> src/PVE/GuestHelpers.pm | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
>
> container:
>
> Friedrich Weber (2):
> api: status: move config locking from API handler into worker
> fix #4474: lxc api: add overrule-shutdown parameter to stop endpoint
>
> src/PVE/API2/LXC/Status.pm | 107 ++++++++++++++++++++-----------------
> 1 file changed, 59 insertions(+), 48 deletions(-)
>
>
> qemu-server:
>
> Friedrich Weber (1):
> fix #4474: qemu api: add overrule-shutdown parameter to stop endpoint
>
> PVE/API2/Qemu.pm | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
>
> manager:
>
> Friedrich Weber (2):
> ui: fix typo to make pve-cluster-tasks store globally available
> fix #4474: ui: guest stop: offer to overrule active shutdown tasks
>
> www/manager6/Makefile | 1 +
> www/manager6/dc/Tasks.js | 2 +-
> www/manager6/lxc/CmdMenu.js | 8 +++-
> www/manager6/lxc/Config.js | 8 ++--
> www/manager6/qemu/CmdMenu.js | 8 +++-
> www/manager6/qemu/Config.js | 8 ++--
> www/manager6/window/GuestStop.js | 75 ++++++++++++++++++++++++++++++++
> 7 files changed, 101 insertions(+), 9 deletions(-)
> create mode 100644 www/manager6/window/GuestStop.js
>
>
> Summary over all repositories:
> 10 files changed, 193 insertions(+), 0 deletions(-)
>
prev parent reply other threads:[~2024-04-03 6:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 17:10 Friedrich Weber
2024-01-30 17:10 ` [pve-devel] [PATCH guest-common v2 1/6] guest helpers: add helper to overrule active tasks of a specific type Friedrich Weber
2024-04-04 15:20 ` Thomas Lamprecht
2024-04-05 13:13 ` Friedrich Weber
2024-04-06 8:37 ` Thomas Lamprecht
2024-04-08 8:38 ` Friedrich Weber
2024-01-30 17:10 ` [pve-devel] [PATCH container v2 2/6] api: status: move config locking from API handler into worker Friedrich Weber
2024-04-04 15:26 ` [pve-devel] applied: " Thomas Lamprecht
2024-04-05 13:16 ` Friedrich Weber
2024-01-30 17:10 ` [pve-devel] [PATCH container v2 3/6] fix #4474: lxc api: add overrule-shutdown parameter to stop endpoint Friedrich Weber
2024-04-06 15:07 ` Thomas Lamprecht
2024-04-08 8:59 ` Friedrich Weber
2024-01-30 17:10 ` [pve-devel] [PATCH qemu-server v2 4/6] fix #4474: qemu " Friedrich Weber
2024-01-30 17:10 ` [pve-devel] [PATCH manager v2 5/6] ui: fix typo to make pve-cluster-tasks store globally available Friedrich Weber
2024-01-30 17:10 ` [pve-devel] [PATCH manager v2 6/6] fix #4474: ui: guest stop: offer to overrule active shutdown tasks Friedrich Weber
2024-04-03 6:55 ` Friedrich Weber [this message]
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=c4c1a37f-1093-47cd-b0a0-d6e0b387fb4b@proxmox.com \
--to=f.weber@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