From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 5A00D1FF0B3 for ; Wed, 14 Oct 2026 15:07:44 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2DADD2145F; Wed, 14 Oct 2026 15:07:42 +0200 (CEST) Message-ID: <8c0157e4-e8a9-4ed8-8d08-98ed82f18a0e@proxmox.com> Date: Wed, 14 Oct 2026 15:07:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH qemu-server v3 13/21] api: migrate: allow forwarding certain migration properties to HA To: Daniel Kral , pve-devel@lists.proxmox.com References: <20260918160841.128088-1-f.ebner@proxmox.com> <20260918160841.128088-14-f.ebner@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791983257990 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.426 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_MED -2.3 Sender listed at https://www.dnswl.org/, medium 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: BQEXXMS3RT2BPUG6GXEILVB5AFS4EHTD X-Message-ID-Hash: BQEXXMS3RT2BPUG6GXEILVB5AFS4EHTD X-MailFrom: f.ebner@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: Am 13.10.26 um 2:25 PM schrieb Daniel Kral: > On Fri Sep 18, 2026 at 6:08 PM CEST, Fiona Ebner wrote: >> diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm >> index 71247eec..b5a850a3 100644 >> --- a/src/PVE/API2/Qemu.pm >> +++ b/src/PVE/API2/Qemu.pm >> @@ -5641,9 +5652,18 @@ __PACKAGE__->register_method({ >> my $hacmd = sub { >> my $upid = shift; >> >> - print "Requesting HA migration for VM $vmid to node $target\n"; >> - >> + my $extra_opts = ''; >> my $cmd = ['ha-manager', 'migrate', "vm:$vmid", $target]; >> + for my $prop (sort keys $ha_migrate_props->%*) { >> + if (defined(my $value = $param->{$prop})) { >> + push($cmd->@*, "--$prop", $value); >> + $extra_opts .= ','; >> + $extra_opts .= " $prop=$value"; >> + } >> + } >> + >> + print "Requesting HA migration for VM $vmid to node ${target}${extra_opts}\n"; > > --with-conntrack-state is always set to either 0 or 1, so essentially > any output will always contain at least > > Requesting HA migration for VM 100 to node node1, with-conntrack-state=0 > > or > > Requesting HA migration for VM 100 to node node1, with-conntrack-state=1 > > > Unrelated to the patch series, but in this specific case it would > probably suffice to not explicitly set $param->{'with-conntrack-state'} > to 0 if not requested by the user directly. It's not always set AFAICS? The UI does not set it if the checkbox is not checked. If it is explicitly set, logging seems more accurate IMHO. > Might be nice to use parenthesis here and for pve-container as well, so > that the less important information (the migration options) are more > separated from the main message (the requested migration): > > Requesting HA migration for VM 100 to node node1 (with-conntrack-state=1) Ack, will do!