[pve-devel] [PATCH v2 container 1/3] migration: fix snapshots boolean accounting

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Jun 23 14:31:36 CEST 2021


On Wed, Jun 23, 2021 at 12:59:58PM +0200, Fabian Grünbichler wrote:
> some indication on what was broken would be nice..
> 
> AFAICT, storage_migrate fixes this to a boolean anyway, and this is only 
> passed to storage_migrate, so.. !?

The type is not the problem. It's assigned - as in overwritten - in each
check, and it's called last for the current state, so this was always
set to false.

> 
> On June 22, 2021 2:18 pm, Wolfgang Bumiller wrote:
> > Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> > ---
> > No changes to v1.
> > 
> >  src/PVE/LXC/Migrate.pm | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
> > index 3cd895d..ce1f7dd 100644
> > --- a/src/PVE/LXC/Migrate.pm
> > +++ b/src/PVE/LXC/Migrate.pm
> > @@ -146,7 +146,7 @@ sub phase1 {
> >  	}
> >  
> >  	$volhash->{$volid}->{ref} = defined($snapname) ? 'snapshot' : 'config';
> > -	$volhash->{$volid}->{snapshots} = defined($snapname);
> > +	$volhash->{$volid}->{snapshots} = 1 if defined($snapname);
> >  
> >  	my ($path, $owner) = PVE::Storage::path($self->{storecfg}, $volid);
> >  
> > -- 
> > 2.30.2





More information about the pve-devel mailing list