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 993481FF0B6 for ; Thu, 12 Nov 2026 11:51:05 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C37882164E; Thu, 12 Nov 2026 11:51:03 +0100 (CET) Message-ID: <7d227b87-3726-4bf7-bfbe-b1b703d7bf9e@proxmox.com> Date: Thu, 12 Nov 2026 11:50:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH container v6 25/26] migration: intra-cluster: check config can be parsed on target node To: =?UTF-8?Q?Michael_K=C3=B6ppl?= , pve-devel@lists.proxmox.com References: <20261103124831.139399-1-f.ebner@proxmox.com> <20261103124831.139399-26-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: 1794480659189 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.277 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: IX5ANSZCZZZWYUHGBJMZE2UZUNARINFO X-Message-ID-Hash: IX5ANSZCZZZWYUHGBJMZE2UZUNARINFO 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:41 PM schrieb Michael Köppl: > On Tue Nov 3, 2026 at 1:48 PM CET, Fiona Ebner wrote: >> index d243d90..4793c5e 100644 >> --- a/src/PVE/LXC/Migrate.pm >> +++ b/src/PVE/LXC/Migrate.pm >> @@ -159,6 +159,39 @@ sub prepare { >> my $cmd = [@{ $self->{rem_ssh} }, '/bin/true']; >> eval { $self->cmd_quiet($cmd); }; >> die "Can't connect to destination address using public key\n" if $@; >> + >> + if (!$self->{opts}->{'skip-config-check'}) { >> + if (PVE::Cluster::node_pvecfg_version_at_least($self->{node}, 9, 2, 26)) { >> + # Fork a short-lived tunnel for checking the config. Later, the proper tunnel with >> + # SSH forwarding info is forked. >> + my $tunnel = PVE::Tunnel::fork_ssh_tunnel( >> + $self->{rem_ssh}, >> + ['pct', 'mtunnel'], >> + undef, >> + sub { >> + my ($level, $msg) = @_; >> + $self->log($level, $msg); >> + }, >> + ); >> + eval { >> + my $nodename = PVE::INotify::nodename(); >> + PVE::Tunnel::write_tunnel($tunnel, 30, "config $vmid $nodename"); >> + }; >> + my $err = $@; >> + >> + eval { PVE::Tunnel::finish_tunnel($tunnel); }; >> + $self->log('warn', "failed to finish tunnel in prepare() - $@") if $@; >> + >> + if ($err) { >> + chomp($err); >> + die "$err - use 'skip-config-check' flag to migrate regardless\n"; >> + } >> + } else { >> + $self->log('info', "skipping config check - target pve-manager version < 9.2.26"); >> + } >> + } else { >> + $self->log('info', "skipping config check - override option is set"); >> + } > > suggestion: since this block only differs from the qemu-server one by > how the tunnel is forked, could this perhaps be moved to > pve-guest-common? Could be done in PVE::AbstractMigrate and > fork_tunnel() could there exist as an abstract that only has to be > implemented in pve-container as well, since qemu-server already has it. I gave this a shot for v7 and also factored out the common SSH check while at it.