The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3325
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) === If we receive btrfs subvolumes from an older LXD instance they are not called ".migration-send" but rather ".root". Handle this case. Closes #3323. Signed-off-by: Christian Brauner <[email protected]>
From af09d582c96961feef6013d680ac5eff62f619ac Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Tue, 16 May 2017 15:26:10 +0200 Subject: [PATCH] storage: handle btrfs migration on different lxds If we receive btrfs subvolumes from an older LXD instance they are not called ".migration-send" but rather ".root". Handle this case. Closes #3323. Signed-off-by: Christian Brauner <[email protected]> --- lxd/storage_btrfs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxd/storage_btrfs.go b/lxd/storage_btrfs.go index 3c9bdd6..a295697 100644 --- a/lxd/storage_btrfs.go +++ b/lxd/storage_btrfs.go @@ -1971,6 +1971,10 @@ func (s *storageBtrfs) MigrationSink(live bool, container container, snapshots [ } receivedSnapshot := fmt.Sprintf("%s/.migration-send", btrfsPath) + // handle older lxd versions + if !shared.PathExists(receivedSnapshot) { + receivedSnapshot = fmt.Sprintf("%s/.root", btrfsPath) + } if isSnapshot { receivedSnapshot = fmt.Sprintf("%s/%s", btrfsPath, snapName) err = s.btrfsPoolVolumesSnapshot(receivedSnapshot, targetPath, true)
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
