diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index 3fe037f8..426bf7ea 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -666,7 +666,7 @@ def get_list_pool(zk_conn, limit, is_fuzzy=True): else: pool_list.append(getPoolInformation(zk_conn, pool)) - return True, sorted(pool_list, key = lambda x: int(x['id'])) + return True, sorted(pool_list, key = lambda x: int(x['stats']['id'])) def format_list_pool(pool_list): pool_list_output = [] @@ -1061,7 +1061,7 @@ def get_list_volume(zk_conn, pool, limit, is_fuzzy=True): else: volume_list.append(getVolumeInformation(zk_conn, pool_name, volume_name)) - return True, sorted(volume_list, key = lambda x: int(x['id'])) + return True, sorted(volume_list, key = lambda x: str(x['name'])) def format_list_volume(volume_list): volume_list_output = []