[pve-devel] [PATCH v3 container 3/3] migrate: skip replication handling if not replicated

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Oct 17 13:25:24 CEST 2017


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 at proxmox.com>
---
 src/PVE/LXC/Migrate.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index 95addab..ee78a5f 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -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 {
-- 
2.14.2





More information about the pve-devel mailing list