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

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) ===
Closes #7313

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From ef15f96b492df5c078264cb781f4592f2c9b60a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Wed, 6 May 2020 09:41:21 -0400
Subject: [PATCH] lxd/resources: Skip NVME multipath entries
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #7313

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/resources/storage.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lxd/resources/storage.go b/lxd/resources/storage.go
index 5bd4dc36ed..d693441528 100644
--- a/lxd/resources/storage.go
+++ b/lxd/resources/storage.go
@@ -138,6 +138,11 @@ func GetStorage() (*api.ResourcesStorage, error) {
                        // Device node
                        diskDev, err := 
ioutil.ReadFile(filepath.Join(entryPath, "dev"))
                        if err != nil {
+                               if os.IsNotExist(err) {
+                                       // This happens on multipath devices, 
just skip as we only care about the main node.
+                                       continue
+                               }
+
                                return nil, errors.Wrapf(err, "Failed to read 
\"%s\"", filepath.Join(entryPath, "dev"))
                        }
                        disk.Device = strings.TrimSpace(string(diskDev))
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to