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 E4F121FF0C1 for ; Fri, 18 Sep 2026 18:10:32 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id AF22E21773; Fri, 18 Sep 2026 18:08:56 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH ha-manager v3 08/21] queue resource motion: support migration options Date: Fri, 18 Sep 2026 18:08:14 +0200 Message-ID: <20260918160841.128088-9-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260918160841.128088-1-f.ebner@proxmox.com> References: <20260918160841.128088-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789747729860 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.593 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 RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) 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: 3CKOQJTCBA5OKONFSWMQXXWPQOA232ZT X-Message-ID-Hash: 3CKOQJTCBA5OKONFSWMQXXWPQOA232ZT 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: Signed-off-by: Fiona Ebner --- New in v3. src/PVE/HA/Manager.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm index 1d9ff36..555ea0d 100644 --- a/src/PVE/HA/Manager.pm +++ b/src/PVE/HA/Manager.pm @@ -294,7 +294,7 @@ sub load_balance { ); $haenv->log('info', "auto rebalance - $task $sid to $target ($imbalance_change_str)"); - $self->queue_resource_motion($cmd, $task, $sid, $target); + $self->queue_resource_motion($cmd, $task, $sid, $target, {}); } sub cleanup { @@ -609,7 +609,7 @@ sub read_lrm_status { } sub queue_resource_motion { - my ($self, $cmd, $task, $sid, $target) = @_; + my ($self, $cmd, $task, $sid, $target, $migrate_options) = @_; my ($haenv, $sc, $ss, $ns, $compiled_rules) = $self->@{qw(haenv sc ss ns compiled_rules)}; my $online_nodes = { map { $_ => 1 } $self->{ns}->list_online_nodes()->@* }; @@ -640,7 +640,7 @@ sub queue_resource_motion { } $haenv->log('info', "got crm command: $cmd"); - $ss->{$sid}->{cmd} = [$task, $target]; + $ss->{$sid}->{cmd} = [$task, $target, $migrate_options]; for my $csid (@$dependent_resources) { next if $ss->{$csid}->{node} && $ss->{$csid}->{node} eq $target; @@ -651,7 +651,7 @@ sub queue_resource_motion { "crm command '$cmd' - $task service '$csid' to node '$target'" . " (service '$csid' in positive affinity with service '$sid')", ); - $ss->{$csid}->{cmd} = [$task, $target]; + $ss->{$csid}->{cmd} = [$task, $target, $migrate_options]; } } @@ -693,7 +693,7 @@ sub update_crm_commands { "ignore crm command - service already on target node: $cmd", ); } else { - $self->queue_resource_motion($cmd, $task, $sid, $node); + $self->queue_resource_motion($cmd, $task, $sid, $node, {}); } } } else { -- 2.47.3