From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: applied: [pve-devel] [PATCH guest-common 1/3] abstract migrate: add map_storage() helper
Date: Fri, 13 Feb 2026 11:54:33 +0100 [thread overview]
Message-ID: <1770980057.995uca4x53.astroid@yuna.none> (raw)
In-Reply-To: <20260121105145.47010-2-f.ebner@proxmox.com>
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.
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> src/PVE/AbstractMigrate.pm | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> 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;
> }
>
> +sub map_storage {
> + my ($self, $scfg, $storeid) = @_;
> +
> + # 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 = 1;
> + } else { # intra-cluster migration, shared storage
> + $do_map = !PVE::Storage::storage_check_node($self->{storecfg}, $storeid, $self->{node}, 1);
> + }
> +
> + return $do_map ? PVE::JSONSchema::map_id($self->{opts}->{storagemap}, $storeid) : $storeid;
> +}
> +
> 1;
> --
> 2.47.3
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
next prev parent reply other threads:[~2026-02-13 10:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 10:51 [pve-devel] [PATCH-SERIES guest-common/qemu-server/container 0/3] fix #3229: migrate: consider node restriction for 'shared' storage Fiona Ebner
2026-01-21 10:51 ` [pve-devel] [PATCH guest-common 1/3] abstract migrate: add map_storage() helper Fiona Ebner
2026-02-13 10:54 ` Fabian Grünbichler [this message]
2026-01-21 10:51 ` [pve-devel] [PATCH qemu-server 2/3] fix #3229: migrate: consider node restriction for 'shared' storage Fiona Ebner
2026-01-21 10:51 ` [pve-devel] [PATCH container 3/3] " Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1770980057.995uca4x53.astroid@yuna.none \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox