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

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 #4736

Signed-off-by: Stéphane Graber <[email protected]>
From 53ab47de6670e6140003f4ae8d30bedcda47e887 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]>
Date: Mon, 9 Jul 2018 23:33:21 -0400
Subject: [PATCH] lxd/cluster: Fix attaching CEPH custom volumes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #4736

Signed-off-by: Stéphane Graber <[email protected]>
---
 lxd/cluster/connect.go | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lxd/cluster/connect.go b/lxd/cluster/connect.go
index c31b6001a..e95312247 100644
--- a/lxd/cluster/connect.go
+++ b/lxd/cluster/connect.go
@@ -73,6 +73,20 @@ func ConnectIfVolumeIsRemote(cluster *db.Cluster, poolID 
int64, volumeName strin
        }
 
        if len(addresses) > 1 {
+               var driver string
+               err := cluster.Transaction(func(tx *db.ClusterTx) error {
+                       var err error
+                       driver, err = tx.StoragePoolDriver(poolID)
+                       return err
+               })
+               if err != nil {
+                       return nil, err
+               }
+
+               if driver == "ceph" {
+                       return nil, nil
+               }
+
                return nil, fmt.Errorf("more than one node has a volume named 
%s", volumeName)
        }
 
@@ -80,6 +94,7 @@ func ConnectIfVolumeIsRemote(cluster *db.Cluster, poolID 
int64, volumeName strin
        if address == "" {
                return nil, nil
        }
+
        return Connect(address, cert, false)
 }
 
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to