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

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) ===
Previously it errored with: `Error: Pool not defined on nodes: none`

As was falling through into cluster storage pool setup mode.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From 2983af787e86c2e8d42d9f55ae0b9d5ae198f55f Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Wed, 7 Oct 2020 16:47:24 +0100
Subject: [PATCH] lxd/storage/pools: Gives clear error message when trying to
 create duplicate storage pool in single node

Previously it errored with: `Error: Pool not defined on nodes: none`

As was falling through into cluster storage pool setup mode.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/storage_pools.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lxd/storage_pools.go b/lxd/storage_pools.go
index b24443404b..01ce07e034 100644
--- a/lxd/storage_pools.go
+++ b/lxd/storage_pools.go
@@ -159,6 +159,8 @@ func storagePoolsPost(d *Daemon, r *http.Request) 
response.Response {
                                }
                                return resp
                        }
+
+                       return response.BadRequest(fmt.Errorf("The storage pool 
already exists"))
                }
 
                // No targetNode was specified and we're clustered, so finalize 
the
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to