From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 62E551FF141 for ; Fri, 13 Feb 2026 11:53:54 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D43BE36A4A; Fri, 13 Feb 2026 11:54:41 +0100 (CET) Date: Fri, 13 Feb 2026 11:54:33 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= Subject: applied: [pve-devel] [PATCH guest-common 1/3] abstract migrate: add map_storage() helper To: Proxmox VE development discussion References: <20260121105145.47010-1-f.ebner@proxmox.com> <20260121105145.47010-2-f.ebner@proxmox.com> In-Reply-To: <20260121105145.47010-2-f.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1770980057.995uca4x53.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770980073460 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.047 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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: TRRIJLQH6J6YOGQEFQFS2T4CNUGFEVE3 X-Message-ID-Hash: TRRIJLQH6J6YOGQEFQFS2T4CNUGFEVE3 X-MailFrom: f.gruenbichler@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: applied this one already, thanks! On January 21, 2026 11:51 am, Fiona Ebner wrote: > For remote migration and non-shared storages, always map. For > intra-cluster migration and a shared storage, map when the storage is > not configured for the target. The latter part is in preparation to > fix bug #3229. >=20 > Signed-off-by: Fiona Ebner > --- > src/PVE/AbstractMigrate.pm | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) >=20 > diff --git a/src/PVE/AbstractMigrate.pm b/src/PVE/AbstractMigrate.pm > index 6b4d34c..919f12d 100644 > --- a/src/PVE/AbstractMigrate.pm > +++ b/src/PVE/AbstractMigrate.pm > @@ -384,4 +384,20 @@ sub get_bwlimit { > return $bwlimit; > } > =20 > +sub map_storage { > + my ($self, $scfg, $storeid) =3D @_; > + > + # NOTE: For remote migration, always map shared storages. For local = migration, shared storages > + # were never mapped in the past, but to fix bug #3229, storages that= are not configured for the > + # target are mapped too. > + my $do_map; > + if ($self->{opts}->{remote} || !$scfg->{shared}) { > + $do_map =3D 1; > + } else { # intra-cluster migration, shared storage > + $do_map =3D !PVE::Storage::storage_check_node($self->{storecfg},= $storeid, $self->{node}, 1); > + } > + > + return $do_map ? PVE::JSONSchema::map_id($self->{opts}->{storagemap}= , $storeid) : $storeid; > +} > + > 1; > --=20 > 2.47.3 >=20 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20 >=20 >=20