[pve-devel] applied: [PATCH] Add guest type at find_local_replication_job

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Jun 28 14:34:59 CEST 2017


applied, but we now basically have 3 different places where we do this
(one in pve-manager, two in pve-guest-common), maybe
ReplicationConfig::parse_config() should just always do this? It's what
they all have in common.

On Wed, Jun 28, 2017 at 02:27:37PM +0200, Wolfgang Link wrote:
> We need this at migration time.
> ---
>  PVE/ReplicationConfig.pm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/PVE/ReplicationConfig.pm b/PVE/ReplicationConfig.pm
> index 51cfe81..670113d 100644
> --- a/PVE/ReplicationConfig.pm
> +++ b/PVE/ReplicationConfig.pm
> @@ -213,9 +213,13 @@ sub check_for_existing_jobs {
>  sub find_local_replication_job {
>      my ($cfg, $vmid, $target) = @_;
>  
> +    my $vms = PVE::Cluster::get_vmlist();
> +
>      foreach my $id (keys %{$cfg->{ids}}) {
>  	my $data = $cfg->{ids}->{$id};
>  
> +	$data->{vmtype} = $vms->{ids}->{$vmid}->{type};
> +
>  	return $data if $data->{type} eq 'local' &&
>  	    $data->{guest} == $vmid && $data->{target} eq $target;
>      }
> -- 
> 2.11.0




More information about the pve-devel mailing list