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 BB3281FF0B6 for ; Thu, 12 Nov 2026 10:22:09 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 07FD321668; Thu, 12 Nov 2026 10:22:04 +0100 (CET) Message-ID: <924d0562-fc3d-44f3-8988-497eabc50021@proxmox.com> Date: Thu, 12 Nov 2026 10:21:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH qemu-server v6 17/26] api: migrate: allow forwarding certain migration properties to HA To: =?UTF-8?Q?Michael_K=C3=B6ppl?= , pve-devel@lists.proxmox.com References: <20261103124831.139399-1-f.ebner@proxmox.com> <20261103124831.139399-18-f.ebner@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794475318397 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.278 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: M4B6Z26GVXADOSWXANGLQ4WY346L6KAL X-Message-ID-Hash: M4B6Z26GVXADOSWXANGLQ4WY346L6KAL 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 11.11.26 um 4:40 PM schrieb Michael Köppl: > On Tue Nov 3, 2026 at 1:48 PM CET, Fiona Ebner wrote: >> - }, >> + properties => $migrate_json_properties, >> }, >> returns => { >> type => 'string', >> @@ -5702,9 +5713,20 @@ __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 .= ', ' if $extra_opts; >> + $extra_opts .= "$prop=$value"; >> + } >> + } > > Only tangentially related, but because I noticed that this came up > previously [0]: when migrating a *stopped* VM through the GUI, > the checkbox for 'with-conntrack-state' is hidden, but the dialog still > sends 'with-conntrack-state: 1', which migrate_vm then overrides with 0 > again. The task log then shows "(with-conntrack-state=0)" and the CRM > receives command > `migrate vm:100 pve2-ceph {"with-conntrack-state":"0"}`. To me, this > looks like a purely cosmetic issue, though, and I'm not sure it's worth > changing how params are forwarded here. > > [0] https://lore.proxmox.com/pve-devel/8c0157e4-e8a9-4ed8-8d08-98ed82f18a0e@proxmox.com/ Ah, so maybe that is what Daniel meant ;) What I wrote in my reply there is that it is not set if the checkbox is unchecked (but for an offline migration the UI doesn't let you uncheck it :P). I'll add a patch to fix this where the property is overwritten for the offline case, not here.