[lxc-devel] [lxd/master] lxd/storage/zfs: No need to remove dashes from UUID
stgraber on Github
lxc-bot at linuxcontainers.org
Tue Oct 27 22:06:44 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201027/020ca034/attachment.bin>
-------------- next part --------------
From 7b5aae3986c7e364e62e12064c73ba439503ddd9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 27 Oct 2020 17:35:49 -0400
Subject: [PATCH] lxd/storage/zfs: No need to remove dashes from UUID
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/storage/drivers/driver_zfs_volumes.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lxd/storage/drivers/driver_zfs_volumes.go b/lxd/storage/drivers/driver_zfs_volumes.go
index 1895fe6a4b..811fb11450 100644
--- a/lxd/storage/drivers/driver_zfs_volumes.go
+++ b/lxd/storage/drivers/driver_zfs_volumes.go
@@ -80,7 +80,7 @@ func (d *zfs) CreateVolume(vol Volume, filler *VolumeFiller, op *operations.Oper
// be restored in the future and a new cached image volume will be created instead.
if volSizeBytes > poolVolSizeBytes {
d.logger.Debug("Renaming deleted cached image volume so that regeneration is used")
- randomVol := NewVolume(d, d.name, vol.volType, vol.contentType, strings.Replace(uuid.NewRandom().String(), "-", "", -1), vol.config, vol.poolConfig)
+ randomVol := NewVolume(d, d.name, vol.volType, vol.contentType, uuid.NewRandom().String(), vol.config, vol.poolConfig)
_, err := shared.RunCommand("/proc/self/exe", "forkzfs", "--", "rename", d.dataset(vol, true), d.dataset(randomVol, true))
if err != nil {
More information about the lxc-devel
mailing list