From 064e6455bc4b74b3e96518b0eb6a446929a8f69a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 19 Jun 2019 00:24:51 -0400 Subject: [PATCH] Correct some more bugs --- node-daemon/pvcd/CephInstance.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/node-daemon/pvcd/CephInstance.py b/node-daemon/pvcd/CephInstance.py index 24a4f79d..b73818c9 100644 --- a/node-daemon/pvcd/CephInstance.py +++ b/node-daemon/pvcd/CephInstance.py @@ -413,7 +413,7 @@ def add_pool(zk_conn, logger, name, pgs): zkhandler.writedata(zk_conn, { '/ceph/pools/{}'.format(name): '', '/ceph/pools/{}/pgs'.format(name): pgs, - '/ceph/pools/{}/stats'.format(name): '{}' + '/ceph/pools/{}/stats'.format(name): '{}', '/ceph/volumes/{}'.format(name): '', '/ceph/snapshots/{}'.format(name): '', }) @@ -495,7 +495,8 @@ def add_volume(zk_conn, logger, pool, name, size): logger.out('Creating new RBD volume {} on pool {}'.format(name, pool), state='i') try: # Create the volume - sizeMiB = size * 1024 + sizeMiB = int(size) * 1024 + print(sizeMiB) retcode, stdout, stderr = common.run_os_command('rbd create --size {} {}/{}'.format(sizeMiB, pool, name)) if retcode: print('rbd create') @@ -507,7 +508,7 @@ def add_volume(zk_conn, logger, pool, name, size): zkhandler.writedata(zk_conn, { '/ceph/volumes/{}/{}'.format(pool, name): '', '/ceph/volumes/{}/{}/size'.format(pool, name): size, - '/ceph/volumes/{}/{}/stats'.format(pool, name): '{}' + '/ceph/volumes/{}/{}/stats'.format(pool, name): '{}', '/ceph/snapshots/{}/{}'.format(pool, name): '', })