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

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: Greg Smith <[email protected]>
From 7257f04e1ba417ac0a70ceb67ef89766f5dcee2d Mon Sep 17 00:00:00 2001
From: Greg Smith <[email protected]>
Date: Sun, 10 Sep 2017 00:52:59 -0700
Subject: [PATCH] ceph: fix divide error

Signed-off-by: Greg Smith <[email protected]>
---
 lxd/storage_ceph_utils.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/storage_ceph_utils.go b/lxd/storage_ceph_utils.go
index 1200677dc..a8bb541f2 100644
--- a/lxd/storage_ceph_utils.go
+++ b/lxd/storage_ceph_utils.go
@@ -1582,7 +1582,7 @@ func (s *storageCeph) rbdShrink(path string, size int64, 
fsType string,
                "--id", s.UserName,
                "--cluster", s.ClusterName,
                "--pool", s.OSDPoolName,
-               "--size", fmt.Sprintf("%dM", (size/1024)),
+               "--size", fmt.Sprintf("%dM", (size/1024/1024)),
                fmt.Sprintf("%s_%s", volumeTypeName, volumeName))
        if err != nil {
                logger.Errorf(`Could not shrink RBD storage volume "%s": %s`,
@@ -1637,7 +1637,7 @@ func (s *storageCeph) rbdGrow(path string, size int64, 
fsType string,
                "--id", s.UserName,
                "--cluster", s.ClusterName,
                "--pool", s.OSDPoolName,
-               "--size", fmt.Sprintf("%dM", (size/1024)),
+               "--size", fmt.Sprintf("%dM", (size/1024/1024)),
                fmt.Sprintf("%s_%s", volumeTypeName, volumeName))
        if err != nil {
                logger.Errorf(`Could not extend RBD storage volume "%s": %s`,
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to