From fba39cb7393ba485e6bb816708e98c6e199b0f4d Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 6 Jun 2020 21:28:54 -0400 Subject: [PATCH] Fix broken sorting for pools and volumes --- daemon-common/ceph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = []