[pve-devel] applied: [PATCH qemu-server v4 1/2] migration: secure and use source volume names for deactivation
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Jan 30 10:42:30 CET 2024
thanks!
On December 19, 2023 3:03 pm, Hannes Duerr wrote:
> During migration, the volume names may change if the name is already in
> use at the target location. We therefore want to save the original names
> so that we can deactivate the original volumes afterwards.
>
> Signed-off-by: Hannes Duerr <h.duerr at proxmox.com>
> ---
> PVE/QemuMigrate.pm | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index b87e47a..8d9b35a 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -1455,6 +1455,8 @@ sub phase3_cleanup {
>
> my $tunnel = $self->{tunnel};
>
> + my $sourcevollist = PVE::QemuServer::get_vm_volumes($conf);
> +
> if ($self->{volume_map} && !$self->{opts}->{remote}) {
> my $target_drives = $self->{target_drive};
>
> @@ -1586,8 +1588,7 @@ sub phase3_cleanup {
>
> # always deactivate volumes - avoid lvm LVs to be active on several nodes
> eval {
> - my $vollist = PVE::QemuServer::get_vm_volumes($conf);
> - PVE::Storage::deactivate_volumes($self->{storecfg}, $vollist);
> + PVE::Storage::deactivate_volumes($self->{storecfg}, $sourcevollist);
> };
> if (my $err = $@) {
> $self->log('err', $err);
> --
> 2.39.2
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
More information about the pve-devel
mailing list