From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 34A681FF13A for ; Wed, 22 Jul 2026 16:03:20 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 09DB121583; Wed, 22 Jul 2026 16:03:01 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Subject: [PATCH-SERIES ha-manager/qemu-server 0/7] fix #7230: acknowledge configured shutdown timeout for HA resources Date: Wed, 22 Jul 2026 16:01:42 +0200 Message-ID: <20260722140149.296952-1-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784728917703 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.242 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: V4WR6USVSVXQ5Q2G2ZEYRC2HZG5WV27Y X-Message-ID-Hash: V4WR6USVSVXQ5Q2G2ZEYRC2HZG5WV27Y X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: If a shutdown request is issued for HA resources, the vm_shutdown API handler and the VM-related HA code will always fallback to 60 seconds. Partially fix #7230 by acknowledging the shutdown timeout value in the VM config and only fallback to 60 seconds otherwise. This allows users to at least set a better timeout value through the VM config. However, this patch series doesn't implement being able to set the value for --force-stop yet, because similar to #7053 [0], the line-based crm_commands are not easily extendable without some churn to accomodate different pve-ha-{crm,lrm} versions across the cluster to add the --force-stop value to it... We should make the crm_commands format more extendible as we might run into more cases where we want to pass relevant parameters through the HA stack without racy/error-prone code that circles around the problem [1]. Though maybe --force-stop 0 could be the new default behavior in the HA stack as long as we spawn new 'request_stop' resource commands and probably introduce some 'max-stop' config for each HA resource so this doesn't end up in an infinite stop loop if for some reason the HA resource really cannot be stopped. [0] https://bugzilla.proxmox.com/show_bug.cgi?id=7053 [1] https://lore.proxmox.com/pve-devel/DGYA16ZRKXXY.3CJFSGFKT7K79@proxmox.com/ qemu-server: Daniel Kral (6): rename config_aware_timeout to config_aware_start_timeout vm_stop: introduce config_aware_shutdown_timeout helper api: qemu: improve wording in timeout parameter descriptions api: qemu: add verbose description for shutdown and reboot timeouts fix #7230: api: vm_shutdown: make HA resources acknowledge config timeout api: vm_reboot: initialize the config-aware timeout in API handler src/PVE/API2/Qemu.pm | 33 ++++++++++++++++++++++++++------- src/PVE/QemuMigrate.pm | 4 ++-- src/PVE/QemuServer.pm | 9 +++------ src/PVE/QemuServer/Helpers.pm | 17 +++++++++++++++-- 4 files changed, 46 insertions(+), 17 deletions(-) ha-manager: Daniel Kral (1): fix #7230: resources: let shutdown api handle timeout fallback value src/PVE/HA/Resources/PVECT.pm | 10 +++++----- src/PVE/HA/Resources/PVEVM.pm | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) Summary over all repositories: 6 files changed, 56 insertions(+), 27 deletions(-) -- Generated by murpp 0.12.0