Support human-readable biconversion and in volumes

This commit is contained in:
2019-06-21 09:22:24 -04:00
parent 3d3fa1b99f
commit 867ad1fc1b
3 changed files with 107 additions and 91 deletions

View File

@ -483,8 +483,7 @@ 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 = int(size) * 1024
retcode, stdout, stderr = common.run_os_command('rbd create --size {} --image-feature layering,exclusive-lock {}/{}'.format(sizeMiB, pool, name))
retcode, stdout, stderr = common.run_os_command('rbd create --size {} --image-feature layering,exclusive-lock {}/{}'.format(size, pool, name))
if retcode:
print('rbd create')
print(stdout)