[pve-devel] applied: [RFC v2 qemu-server 4/5] adapt to new storage_migrate activation behavior

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Nov 24 16:29:17 CET 2020


On November 6, 2020 3:30 pm, Fabian Ebner wrote:
> Offline migrated volumes are now activated within storage_migrate.
> Online migrated volumes can be assumed to be already active.
> 
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
> 
> dependency bump needed
> 
> Sent as RFC, because I'm not completly sure if this is fine here.
> Is the assumption about online volumes correct or is there some weird
> edge case I'm missing?
> I only found run_replication as a potential place that might need active
> local volumes, but that also uses storage_migrate in the end.
> 
>  PVE/QemuMigrate.pm | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 2f4eec3..f2c2b07 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -251,7 +251,6 @@ sub prepare {
>  
>      my $vollist = PVE::QemuServer::get_vm_volumes($conf);
>  
> -    my $need_activate = [];
>      foreach my $volid (@$vollist) {
>  	my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
>  
> @@ -266,16 +265,9 @@ sub prepare {
>  	    my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
>  	    warn "Used shared storage '$sid' is not online on source node!\n"
>  		if !$plugin->check_connection($sid, $scfg);
> -	} else {
> -	    # only activate if not shared
> -	    next if ($volid =~ m/vm-\d+-cloudinit/);
> -	    push @$need_activate, $volid;
>  	}
>      }
>  
> -    # activate volumes
> -    PVE::Storage::activate_volumes($self->{storecfg}, $need_activate);
> -
>      # test ssh connection
>      my $cmd = [ @{$self->{rem_ssh}}, '/bin/true' ];
>      eval { $self->cmd_quiet($cmd); };
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> 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