[pve-devel] [PATCH pve-manager 4/4] Remove guest form replication.cfg it no vms exists.

Dietmar Maurer dietmar at proxmox.com
Thu Jun 8 09:46:52 CEST 2017


This can result in many parallel cluster locking request, so I do not really
like this.

I think it is enough if we have a --force flag for job removal.

> On June 2, 2017 at 11:21 AM Wolfgang Link <w.link at proxmox.com> wrote:
> 
> 
> ---
>  PVE/Replication.pm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/Replication.pm b/PVE/Replication.pm
> index ae486e16..c0f80778 100644
> --- a/PVE/Replication.pm
> +++ b/PVE/Replication.pm
> @@ -90,8 +90,11 @@ sub job_status {
>  
>  	die "internal error - not implemented" if $jobcfg->{type} ne 'local';
>  
> -	# skip non existing vms
> -	next if !$vms->{ids}->{$vmid};
> +	# skip non existing vms or delete if remove_job is set
> +	if (!$vms->{ids}->{$vmid}) {
> +	    delete_job($jobid) if $jobcfg->{remove_job};
> +	    next;
> +	}
>  
>  	# only consider guest on local node
>  	next if $vms->{ids}->{$vmid}->{node} ne $local_node;
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list