Always create RBDs with bytes value
Converting into human results in imprecise values when specifying bytes directly, which in turn breaks VMDK image uploads. Instead, just use the raw bytes value when creating the volume instead of converting it back.
This commit is contained in:
parent
35e27f79ef
commit
a0b45a2bcd
|
@ -763,9 +763,7 @@ def add_volume(zkhandler, pool, name, size):
|
|||
|
||||
# 2. Create the volume
|
||||
retcode, stdout, stderr = common.run_os_command(
|
||||
"rbd create --size {} {}/{}".format(
|
||||
format_bytes_tohuman(size_bytes), pool, name
|
||||
)
|
||||
"rbd create --size {}B {}/{}".format(size_bytes, pool, name)
|
||||
)
|
||||
if retcode:
|
||||
return False, 'ERROR: Failed to create RBD volume "{}": {}'.format(name, stderr)
|
||||
|
|
Loading…
Reference in New Issue