Fix up bugs in the naming

This commit is contained in:
Joshua Boniface 2019-07-26 16:38:35 -04:00
parent 837666a15e
commit 2710ed8432
1 changed files with 3 additions and 3 deletions

View File

@ -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.'