all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Kral <d.kral@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 1/7] rename config_aware_timeout to config_aware_start_timeout
Date: Wed, 22 Jul 2026 16:01:43 +0200	[thread overview]
Message-ID: <20260722140149.296952-2-d.kral@proxmox.com> (raw)
In-Reply-To: <20260722140149.296952-1-d.kral@proxmox.com>

The config_aware_timeout() helper is only used to estimate an
appropriate timeout value for VM startups.

This is done in preperation of another patch, which introduces a helper
to compute the shutdown timeout.

Signed-off-by: Daniel Kral <d.kral@proxmox.com>
---
 src/PVE/QemuMigrate.pm        | 4 ++--
 src/PVE/QemuServer.pm         | 5 +++--
 src/PVE/QemuServer/Helpers.pm | 4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index 8da6f15d..afe0f777 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -31,7 +31,7 @@ use PVE::QemuServer::Agent;
 use PVE::QemuServer::BlockJob;
 use PVE::QemuServer::CPUConfig;
 use PVE::QemuServer::Drive qw(checked_volume_format);
-use PVE::QemuServer::Helpers qw(min_version);
+use PVE::QemuServer::Helpers qw(config_aware_start_timeout min_version);
 use PVE::QemuServer::Machine;
 use PVE::QemuServer::Monitor qw(mon_cmd vm_qmp_peer);
 use PVE::QemuServer::Memory qw(get_current_memory);
@@ -1157,7 +1157,7 @@ sub phase2_start_remote_cluster {
 
     # like regular start but with some overhead accounted for
     my $memory = get_current_memory($self->{vmconf}->{memory});
-    my $timeout = PVE::QemuServer::Helpers::config_aware_timeout($self->{vmconf}, $memory) + 10;
+    my $timeout = config_aware_start_timeout($self->{vmconf}, $memory) + 10;
 
     my $res = PVE::Tunnel::write_tunnel($self->{tunnel}, $timeout, "start", $params);
 
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 191ae549..5b9f5753 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -57,7 +57,7 @@ use PVE::QemuServer::Blockdev;
 use PVE::QemuServer::BlockJob;
 use PVE::QemuServer::Cfg2Cmd;
 use PVE::QemuServer::Helpers
-    qw(config_aware_timeout get_iscsi_initiator_name get_host_arch min_version kvm_user_version windows_version);
+    qw(config_aware_start_timeout get_iscsi_initiator_name get_host_arch min_version kvm_user_version windows_version);
 use PVE::QemuServer::Cloudinit;
 use PVE::QemuServer::CGroup;
 use PVE::QemuServer::CPUConfig qw(
@@ -5675,7 +5675,8 @@ sub vm_start_nolock {
         );
 
         my $memory = get_current_memory($conf->{memory});
-        $start_timeout = $params->{timeout} // config_aware_timeout($conf, $memory, $resume);
+        $start_timeout = $params->{timeout}
+            // config_aware_start_timeout($conf, $memory, $resume);
 
         push $cmd->@*, $state_cmdline->@*;
 
diff --git a/src/PVE/QemuServer/Helpers.pm b/src/PVE/QemuServer/Helpers.pm
index dd17eef5..de9bc098 100644
--- a/src/PVE/QemuServer/Helpers.pm
+++ b/src/PVE/QemuServer/Helpers.pm
@@ -15,7 +15,7 @@ use PVE::Tools;
 use base 'Exporter';
 our @EXPORT_OK = qw(
     min_version
-    config_aware_timeout
+    config_aware_start_timeout
     get_iscsi_initiator_name
     kvm_user_version
     parse_number_sets
@@ -261,7 +261,7 @@ sub version_cmp {
     return 0;
 }
 
-sub config_aware_timeout {
+sub config_aware_start_timeout {
     my ($config, $memory, $is_suspended) = @_;
     my $timeout = 30;
 
-- 
2.47.3





  reply	other threads:[~2026-07-22 14:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 14:01 [PATCH-SERIES ha-manager/qemu-server 0/7] fix #7230: acknowledge configured shutdown timeout for HA resources Daniel Kral
2026-07-22 14:01 ` Daniel Kral [this message]
2026-07-22 14:01 ` [PATCH qemu-server 2/7] vm_stop: introduce config_aware_shutdown_timeout helper Daniel Kral
2026-07-22 14:01 ` [PATCH qemu-server 3/7] api: qemu: improve wording in timeout parameter descriptions Daniel Kral
2026-07-22 14:01 ` [PATCH qemu-server 4/7] api: qemu: add verbose description for shutdown and reboot timeouts Daniel Kral
2026-07-22 14:01 ` [PATCH qemu-server 5/7] fix #7230: api: vm_shutdown: make HA resources acknowledge config timeout Daniel Kral
2026-07-22 14:01 ` [PATCH qemu-server 6/7] api: vm_reboot: initialize the config-aware timeout in API handler Daniel Kral
2026-07-22 14:01 ` [PATCH ha-manager 7/7] fix #7230: resources: let shutdown api handle timeout fallback value Daniel Kral

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=20260722140149.296952-2-d.kral@proxmox.com \
    --to=d.kral@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