[pve-devel] [PATCH guest-common 3/6] Delete replication snapshots only if last_sync exists.

Wolfgang Link w.link at proxmox.com
Tue Dec 19 15:51:17 CET 2017


> Thomas Lamprecht <t.lamprecht at proxmox.com> hat am 14. Dezember 2017 um 07:47 geschrieben:
> 
> 
> > +		$last_snapshots->{$volid}->{$snap} = 1;
> >  	    }
> >  	}
> >      }
> > @@ -207,11 +210,11 @@ sub replicate {
> >  	    }
> >  
> >  	    my $ssh_info = PVE::Cluster::get_ssh_info($jobcfg->{target});
> > -	    remote_prepare_local_job($ssh_info, $jobid, $vmid, [], $store_list, 0, undef, 1, $logfunc);
> > +	    remote_prepare_local_job($ssh_info, $jobid, $vmid, [], $store_list, 1, undef, 1, $logfunc);
> >  
> >  	}
> >  	# remove all local replication snapshots (lastsync => 0)
> 
> you change last_sync to 1 below, does the comment above still holds?
Yes because we use last_sync only to generate the snapshot name and 
__replicate_<$jobid>_0__
__replicate_<$jobid>_1__
should both not match to any valid replication snapshot.
> 
> > -	prepare($storecfg, $sorted_volids, $jobid, 0, undef, $logfunc);
> > +	prepare($storecfg, $sorted_volids, $jobid, 1, undef, $logfunc);
> >  
> >  	PVE::ReplicationConfig::delete_job($jobid); # update config
> >  	$logfunc->("job removed");
> > 
>




More information about the pve-devel mailing list