[pve-devel] [PATCH v3 pve-manager 15/23] PVE::Replication::remote_finalize_local_job - new helper

Dietmar Maurer dietmar at proxmox.com
Tue May 30 15:20:12 CEST 2017


Simple wrapper to call "pvesr finalize-local-job" on a remote
cluster node.

Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 PVE/Replication.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/PVE/Replication.pm b/PVE/Replication.pm
index a3876cf9..ee0b841b 100644
--- a/PVE/Replication.pm
+++ b/PVE/Replication.pm
@@ -187,6 +187,16 @@ sub remote_prepare_local_job {
     return $remote_snapshots;
 }
 
+sub remote_finalize_local_job {
+    my ($ssh_info, $jobid, $vmid, $volumes, $last_sync) = @_;
+
+    my $ssh_cmd = PVE::Cluster::ssh_info_to_command($ssh_info);
+    my $cmd = [@$ssh_cmd, '--', 'pvesr', 'finalize-local-job', $jobid,
+	       $vmid, @$volumes, '--last_sync', $last_sync];
+
+    PVE::Tools::run_command($cmd);
+}
+
 sub prepare {
     my ($storecfg, $volids, $jobid, $last_sync, $start_time, $logfunc) = @_;
 
-- 
2.11.0




More information about the pve-devel mailing list