Fix up bugs in the naming
This commit is contained in:
parent
837666a15e
commit
2710ed8432
|
@ -1007,11 +1007,11 @@ def rename_volume(zk_conn, pool, name, new_name):
|
||||||
with lock:
|
with lock:
|
||||||
try:
|
try:
|
||||||
result = zkhandler.readdata(zk_conn, '/ceph/cmd').split()[0]
|
result = zkhandler.readdata(zk_conn, '/ceph/cmd').split()[0]
|
||||||
if result == 'success-volume_add':
|
if result == 'success-volume_rename':
|
||||||
message = 'Created new RBD volume "{}" of size "{}" on pool "{}".'.format(name, size, pool)
|
message = 'Renamed RBD volume "{}" to "{}" on pool "{}".'.format(name, new_name, pool)
|
||||||
success = True
|
success = True
|
||||||
else:
|
else:
|
||||||
message = 'ERROR: Failed to create new volume; check node logs for details.'
|
message = 'ERROR: Failed to rename volume {} to {}; check node logs for details.'.format(name, new_name)
|
||||||
success = False
|
success = False
|
||||||
except:
|
except:
|
||||||
message = 'ERROR: Command ignored by node.'
|
message = 'ERROR: Command ignored by node.'
|
||||||
|
|
Loading…
Reference in New Issue