Fix bug with pool removal

This commit is contained in:
Joshua Boniface 2019-06-18 21:51:03 -04:00
parent 264c2d4748
commit ee73676114
1 changed files with 3 additions and 3 deletions

View File

@ -809,13 +809,13 @@ def remove_pool(zk_conn, name):
try: try:
result = zkhandler.readdata(zk_conn, '/ceph/cmd').split()[0] result = zkhandler.readdata(zk_conn, '/ceph/cmd').split()[0]
if result == 'success-pool_remove': if result == 'success-pool_remove':
message = 'Removed RBD pool {} and all volumes.'.format(name, pgs) message = 'Removed RBD pool {} and all volumes.'.format(name)
success = True success = True
else: else:
message = 'ERROR: Failed to remove pool; check node logs for details.' message = 'ERROR: Failed to remove pool; check node logs for details.'
success = False success = False
except: except Exception as e:
message = 'ERROR: Command ignored by node.' message = 'ERROR: Command ignored by node: {}'.format(e)
success = False success = False
zkhandler.writedata(zk_conn, {'/ceph/cmd': ''}) zkhandler.writedata(zk_conn, {'/ceph/cmd': ''})