From afbbc4f34479abfba4b275f0de82920246398e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Wed, 14 Feb 2024 13:59:33 +0100 Subject: [PATCH] lxd/storage/backend_lxd: Don't use storage name when creating source snapshots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The final snapshotStorageName will contain the projects identifier twice if the storage name used to create the vol is used a second time. Signed-off-by: Julian Pelizäus --- lxd/storage/backend_lxd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/storage/backend_lxd.go b/lxd/storage/backend_lxd.go index 656938a81330..9c626e8f790f 100644 --- a/lxd/storage/backend_lxd.go +++ b/lxd/storage/backend_lxd.go @@ -733,7 +733,7 @@ func (b *lxdBackend) CreateInstanceFromBackup(srcBackup backup.Info, srcData io. sourceSnapshots := make([]drivers.Volume, 0, len(srcBackup.Config.VolumeSnapshots)) for _, volSnap := range srcBackup.Config.VolumeSnapshots { - snapshotName := drivers.GetSnapshotVolumeName(vol.Name(), volSnap.Name) + snapshotName := drivers.GetSnapshotVolumeName(srcBackup.Name, volSnap.Name) snapshotStorageName := project.Instance(srcBackup.Project, snapshotName) sourceSnapshots = append(sourceSnapshots, b.GetVolume(volType, contentType, snapshotStorageName, volSnap.Config)) }