]> git.proxmox.com Git - pve-container.git/commitdiff
migrate: skip replication handling if not replicated
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 17 Oct 2017 11:25:24 +0000 (13:25 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 17 Oct 2017 11:29:27 +0000 (13:29 +0200)
in case the container has no replicated disks, this reduces downtime for
restart migration and makes the log shorter

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/LXC/Migrate.pm

index 95addab48820a0cf4808c7dfa440e6c419a53860..ee78a5f43a57f103e61b58ae1f0c968a073eab4d 100644 (file)
@@ -304,7 +304,7 @@ sub phase1 {
     PVE::Storage::deactivate_volumes($self->{storecfg}, $vollist);
 
    # transfer replication state before move config
-    $self->transfer_replication_state();
+    $self->transfer_replication_state() if $rep_volumes;
 
     # move config
     die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
@@ -312,7 +312,7 @@ sub phase1 {
 
     $self->{conf_migrated} = 1;
 
-    $self->switch_replication_job_target();
+    $self->switch_replication_job_target() if $rep_volumes;
 }
 
 sub phase1_cleanup {