The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6818

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
When a container is running, and has a new snapshot to sync during refresh mode, after the snapshot has been synced initially, it is also still sent as part of the final sync stage, which is not needed as snapshots are not being modified.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From eb874f31d73838a0d9bef232c8b50a6b1db90bd7 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Fri, 31 Jan 2020 10:13:45 +0000
Subject: [PATCH] lxd/migrate/container: Fixes migrate refresh final sync
 snapshot bug

When a container is running, and has a new snapshot to sync during refresh 
mode, after the snapshot has been synced initially, it is also still sent as 
part of the final sync stage, which is not needed as snapshots are not being 
modified.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/migrate_container.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lxd/migrate_container.go b/lxd/migrate_container.go
index a3a7ca58f4..8af9bd8b38 100644
--- a/lxd/migrate_container.go
+++ b/lxd/migrate_container.go
@@ -754,8 +754,10 @@ func (s *migrationSourceWs) Do(state *state.State, 
migrateOp *operations.Operati
        // Perform final sync if in multi sync mode.
        if volSourceArgs.MultiSync {
                if pool != nil {
-                       // Indicate to the storage driver we are doing final 
sync.
+                       // Indicate to the storage driver we are doing final 
sync and because of this don't send
+                       // snapshots as they don't need to have a final sync as 
not being modified.
                        volSourceArgs.FinalSync = true
+                       volSourceArgs.Snapshots = nil
 
                        err = pool.MigrateInstance(s.instance, 
&shared.WebsocketIO{Conn: s.fsConn}, volSourceArgs, migrateOp)
                        if err != nil {
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to