[lxc-devel] [lxd/master] lxd/storage: Allow ceph/cephfs for images/backups

stgraber on Github lxc-bot at linuxcontainers.org
Tue Sep 29 16:59:42 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 472 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200929/d56f53fa/attachment.bin>
-------------- next part --------------
From d44832f3aee87c28ba2fb777300d05bd90942d00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 29 Sep 2020 12:58:32 -0400
Subject: [PATCH] lxd/storage: Allow ceph/cephfs for images/backups
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The config key is node-local, so as long as a different volume is used
per server, this is perfectly fine to use.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/daemon_storage.go | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lxd/daemon_storage.go b/lxd/daemon_storage.go
index c9e1c78bc6..8369606854 100644
--- a/lxd/daemon_storage.go
+++ b/lxd/daemon_storage.go
@@ -93,16 +93,11 @@ func daemonStorageValidate(s *state.State, target string) error {
 	volumeName := fields[1]
 
 	// Validate pool exists.
-	poolID, dbPool, err := s.Cluster.GetStoragePool(poolName)
+	poolID, _, err := s.Cluster.GetStoragePool(poolName)
 	if err != nil {
 		return errors.Wrapf(err, "Unable to load storage pool %q", poolName)
 	}
 
-	// Validate pool driver (can't be CEPH or CEPHFS).
-	if dbPool.Driver == "ceph" || dbPool.Driver == "cephfs" {
-		return fmt.Errorf("Server storage volumes cannot be stored on Ceph")
-	}
-
 	// Confirm volume exists.
 	_, _, err = s.Cluster.GetLocalStoragePoolVolume(project.Default, volumeName, db.StoragePoolVolumeTypeCustom, poolID)
 	if err != nil {


More information about the lxc-devel mailing list