]> git.proxmox.com Git - pve-manager.git/commit
ceph: osd_belongs_to_node: only check tree-entries of type host, refactor
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Apr 2021 16:05:56 +0000 (18:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Apr 2021 16:06:07 +0000 (18:06 +0200)
commitd7a63207a37204d00184c7736d4549f844e9cfe9
treeaae2bc82b4e1c2f989ecd1fc3566c6b437802b0c
parente12c5dbf22bd46fbfb00c77d9ee90535dd0523b4
ceph: osd_belongs_to_node: only check tree-entries of type host, refactor

We want to check explicitly for type host, so filter for that first
and create a hash map for easier usage afterwards.

Drop the error when there's no tree, as either RADOS error'd on bad
command already, or there really is no tree (but RADOS worked OK), in
which case we simply return that the OSD did not belong to this node.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Ceph/OSD.pm
test/OSD_test.pl