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

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) ===
Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From 971427e2c5a3624ec357b6fb774907780651a10f Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanay...@canonical.com>
Date: Mon, 14 Sep 2020 09:37:34 +0200
Subject: [PATCH] db: Handle NULL storage_volume description column in patch 34

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
---
 lxd/db/cluster/update.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lxd/db/cluster/update.go b/lxd/db/cluster/update.go
index d9ba84a2e0..ac34d402c3 100644
--- a/lxd/db/cluster/update.go
+++ b/lxd/db/cluster/update.go
@@ -178,7 +178,7 @@ ORDER BY storage_volumes.name
 
        err = query.SelectObjects(stmt, dest)
        if err != nil {
-               return errors.Wrap(err, "Failed to fetch storage volumes")
+               return errors.Wrap(err, "Failed to fetch ceph storage volumes")
        }
 
        // Remove multiple entries of the same volume when using remote storage
@@ -243,7 +243,9 @@ CREATE TABLE storage_volumes_new (
                }
        }
 
-       stmt, err = tx.Prepare(`SELECT * FROM storage_volumes;`)
+       stmt, err = tx.Prepare(`
+SELECT id, name, storage_pool_id, node_id, type, coalesce(description, ''), 
project_id content_type
+FROM storage_volumes`)
        if err != nil {
                return errors.Wrap(err, "Failed to prepare storage volumes 
query")
        }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to