The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8218

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) ===
This is caused because /dev/zvol appears to not be populated when using the snap.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From 2c6b7c840cfd03c1328a4ec3953239116b87321a Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Mon, 7 Dec 2020 11:21:40 +0000
Subject: [PATCH] lxd/storage/drivers/drivers/zfs/volumes: Fixes 10s delay when
 using VMs with ZFS in snap

This is caused because /dev/zvol appears to not be populated when using the 
snap.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.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 42e8056d1b..78152519e9 100644
--- a/lxd/storage/drivers/driver_zfs_volumes.go
+++ b/lxd/storage/drivers/driver_zfs_volumes.go
@@ -1003,7 +1003,7 @@ func (d *zfs) SetVolumeQuota(vol Volume, size string, op 
*operations.Operation)
 // GetVolumeDiskPath returns the location of a root disk block device.
 func (d *zfs) GetVolumeDiskPath(vol Volume) (string, error) {
        // Shortcut for udev.
-       if tryExists(filepath.Join("/dev/zvol", d.dataset(vol, false))) {
+       if shared.PathExists(filepath.Join("/dev/zvol", d.dataset(vol, false))) 
{
                return filepath.Join("/dev/zvol", d.dataset(vol, false)), nil
        }
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to