Skip to content

Commit

Permalink
lxd/storage/backend_lxd: Don't use storage name when creating source …
Browse files Browse the repository at this point in the history
…snapshots

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 <[email protected]>
  • Loading branch information
roosterfish committed Feb 14, 2024
1 parent 50f721c commit afbbc4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lxd/storage/backend_lxd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit afbbc4f

Please sign in to comment.