The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7757
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 fixes a bug in which volumes wouldn't be listed at all if one of the nodes didn't have any volumes. Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From 852c622d8b69fa7dd1880376eba39509f0cd54b1 Mon Sep 17 00:00:00 2001 From: Thomas Hipp <thomas.h...@canonical.com> Date: Mon, 10 Aug 2020 13:56:55 +0200 Subject: [PATCH] lxd/db: Fix premature failure when listing cluster volumes This fixes a bug in which volumes wouldn't be listed at all if one of the nodes didn't have any volumes. Signed-off-by: Thomas Hipp <thomas.h...@canonical.com> --- lxd/db/storage_volumes.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxd/db/storage_volumes.go b/lxd/db/storage_volumes.go index 85a045c249..0111600631 100644 --- a/lxd/db/storage_volumes.go +++ b/lxd/db/storage_volumes.go @@ -106,6 +106,10 @@ SELECT DISTINCT node_id for _, nodeID := range nodeIDs { nodeVolumes, err := c.storagePoolVolumesGet(project, poolID, int64(nodeID), volumeTypes) if err != nil { + if err == ErrNoSuchObject { + continue + } + return nil, err } volumes = append(volumes, nodeVolumes...)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel