The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7087
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) === Ignores snapshots when getting list of custom volumes to be renamed. Snapshots of custom volumes will be renamed as part of parent volume rename. Fixes #7076 Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From b863b4dbb5042fae7e907f6852be31c5b63ffc81 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Thu, 26 Mar 2020 17:47:56 +0000 Subject: [PATCH] lxd/storage/backend/lxd/patches: Ignores snapshots when retrieving list of custom volumes to be renamed Snapshots of custom volumes will be renamed as part of parent volume rename. Fixes #7076 Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxd/storage/backend_lxd_patches.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxd/storage/backend_lxd_patches.go b/lxd/storage/backend_lxd_patches.go index 86746eab0d..99b45d9a00 100644 --- a/lxd/storage/backend_lxd_patches.go +++ b/lxd/storage/backend_lxd_patches.go @@ -43,6 +43,10 @@ func lxdPatchStorageRenameCustomVolumeAddProject(b *lxdBackend) error { defer revert.Fail() for _, v := range volumes { + if shared.IsSnapshot(v.Name) { + continue // Snapshots will be renamed as part of the parent volume rename. + } + // Run inside temporary function to ensure revert has correct volume scope. err = func(curVol *api.StorageVolume) error { // There's no need to pass the config as it's not needed when renaming a volume.
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel