[pve-devel] [PATCH V2 qemu-server] Remove guest states to ensure no old states are exists

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jun 27 14:37:40 CEST 2017


On Tue, Jun 27, 2017 at 01:39:33PM +0200, Wolfgang Link wrote:
> ---
>  PVE/API2/Qemu.pm | 3 +++
>  1 file changed, 3 insertions(+)
> 
> PATCH V2
> Move delete_guest_states to ensure all checks are past.
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index da5f5b1..87e618a 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -586,6 +586,9 @@ __PACKAGE__->register_method({
>  	};
>  
>  	return PVE::QemuConfig->lock_config_full($vmid, 1, $archive ? $restorefn : $createfn);
        ^^^^^^

There's a return above, the code below won't be executed.

> +
> +	# ensure no old replication state are exists
> +	PVE::ReplicationState::delete_guest_states($vmid);
>      }});
>  
>  __PACKAGE__->register_method({
> -- 
> 2.11.0




More information about the pve-devel mailing list