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

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) ===

From 0ee636be37322770f1ab54c4eafa4674c8f44e60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Thu, 23 Apr 2020 10:32:52 -0400
Subject: [PATCH 1/2] lxd/instance/qemu: Add comment on cpuTopology
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/instance/drivers/driver_qemu.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index 3c3eb28dc2..1d1b7fbce5 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -4291,6 +4291,8 @@ func (vm *qemu) UpdateBackupFile() error {
        return pool.UpdateInstanceBackupFile(vm, nil)
 }
 
+// cpuTopology takes a user cpu range and returns the number of sockets, cores 
and threads to configure
+// as well as a map of vcpu to threadid for pinning and a map of numa nodes to 
vcpus for NUMA layout.
 func (vm *qemu) cpuTopology(limit string) (int, int, int, map[uint64]uint64, 
map[uint64][]uint64, error) {
        // Get CPU topology.
        cpus, err := resources.GetCPU()

From c2592017e081ac5c9d44bd9fcc12fcb87f151e4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Thu, 23 Apr 2020 15:15:28 -0400
Subject: [PATCH 2/2] lxd/storage/ceph: Support port in URL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/storage/drivers/driver_cephfs.go | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/lxd/storage/drivers/driver_cephfs.go 
b/lxd/storage/drivers/driver_cephfs.go
index 39decb6fdc..11092f4be0 100644
--- a/lxd/storage/drivers/driver_cephfs.go
+++ b/lxd/storage/drivers/driver_cephfs.go
@@ -140,7 +140,12 @@ func (d *cephfs) Create() error {
        }
 
        // Mount the pool.
-       uri := fmt.Sprintf("%s:6789:/", strings.Join(monAddresses, ","))
+       uri := strings.Join(monAddresses, ",")
+       if !strings.Contains(uri, ":6789") {
+               uri = fmt.Sprintf("%s:6789", uri)
+       }
+       uri = fmt.Sprintf("%s:/", uri)
+
        err = TryMount(uri, mountPoint, "ceph", 0, 
fmt.Sprintf("name=%v,secret=%v,mds_namespace=%v", d.config["cephfs.user.name"], 
userSecret, fsName))
        if err != nil {
                return err
@@ -197,7 +202,12 @@ func (d *cephfs) Delete(op *operations.Operation) error {
        }
 
        // Mount the pool.
-       uri := fmt.Sprintf("%s:6789:/", strings.Join(monAddresses, ","))
+       uri := strings.Join(monAddresses, ",")
+       if !strings.Contains(uri, ":6789") {
+               uri = fmt.Sprintf("%s:6789", uri)
+       }
+       uri = fmt.Sprintf("%s:/", uri)
+
        err = TryMount(uri, mountPoint, "ceph", 0, 
fmt.Sprintf("name=%v,secret=%v,mds_namespace=%v", d.config["cephfs.user.name"], 
userSecret, fsName))
        if err != nil {
                return err
@@ -269,7 +279,12 @@ func (d *cephfs) Mount() (bool, error) {
        }
 
        // Mount the pool.
-       uri := fmt.Sprintf("%s:6789:/%s", strings.Join(monAddresses, ","), 
fsPath)
+       uri := strings.Join(monAddresses, ",")
+       if !strings.Contains(uri, ":6789") {
+               uri = fmt.Sprintf("%s:6789", uri)
+       }
+       uri = fmt.Sprintf("%s:/%s", uri, fsPath)
+
        err = TryMount(uri, GetPoolMountPath(d.name), "ceph", 0, 
fmt.Sprintf("name=%v,secret=%v,mds_namespace=%v", d.config["cephfs.user.name"], 
userSecret, fsName))
        if err != nil {
                return false, err
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to