X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fpybind%2Fmgr%2Fdashboard%2Frbd_iscsi.py;h=d0de918dab1130f11404b6dd209054dd69994b83;hb=b5b8bbf502232d622a7da9967b7d060f200f8a5a;hp=9e0fda6223dd983fb36bacbafa901c70c4556acf;hpb=913cc16a67d4a352a20bb5ce6dd6b8259eeeb5d5;p=ceph.git diff --git a/ceph/src/pybind/mgr/dashboard/rbd_iscsi.py b/ceph/src/pybind/mgr/dashboard/rbd_iscsi.py index 9e0fda622..d0de918da 100644 --- a/ceph/src/pybind/mgr/dashboard/rbd_iscsi.py +++ b/ceph/src/pybind/mgr/dashboard/rbd_iscsi.py @@ -27,22 +27,23 @@ class DaemonsAndImages(RemoteViewCache): } daemons[server['hostname']] = daemon - image = images.get(service['id']) + image_id = service['id'].split(':')[-1] + image = images.get(image_id) if image is None: image = { - 'id': service['id'], + 'id': image_id, 'pool_name': metadata['pool_name'], 'name': metadata['image_name'], 'optimized_paths': [], 'non_optimized_paths': [] } - if status.get('lock_owner', 'false') == 'true': - daemon['optimized_paths'] += 1 - image['optimized_paths'].append(server['hostname']) - else: - daemon['non_optimized_paths'] += 1 - image['non_optimized_paths'].append(server['hostname']) - images[service['id']] = image + images[image_id] = image + if status.get('lock_owner', 'false') == 'true': + daemon['optimized_paths'] += 1 + image['optimized_paths'].append(server['hostname']) + else: + daemon['non_optimized_paths'] += 1 + image['non_optimized_paths'].append(server['hostname']) return { 'daemons': [daemons[k] for k in sorted(daemons, key=daemons.get)],