[pve-devel] [PATCH manager 1/6] Set source when creating a new replication job

Fabian Ebner f.ebner at proxmox.com
Mon Aug 10 14:35:52 CEST 2020


If source is missing, pvesr will set it via job_status
on the next run. But the info is already present here,
so it doesn't hurt to use it.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/API2/ReplicationConfig.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/API2/ReplicationConfig.pm b/PVE/API2/ReplicationConfig.pm
index 2b4ecd10..b85e5804 100644
--- a/PVE/API2/ReplicationConfig.pm
+++ b/PVE/API2/ReplicationConfig.pm
@@ -138,6 +138,7 @@ __PACKAGE__->register_method ({
 	    my $opts = $plugin->check_config($id, $param, 1, 1);
 
 	    $opts->{guest} = $guest;
+	    $opts->{source} //= $vmlist->{ids}->{$guest}->{node};
 
 	    $cfg->{ids}->{$id} = $opts;
 
-- 
2.20.1






More information about the pve-devel mailing list