After destroying an OSD, the command "ceph node ls" still listed the destroyed OSD,
causing confusion. This fix ensures that the status of the OSD is checked before
adding it to the output, aligning its behavior with "ceph osd tree," which already
displays the correct status.
Fixes: https://tracker.ceph.com/issues/70400
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit
97c43c728dc8e702ce19bc14f6aa9a4790c8415b)
// not likely though
continue;
}
+ if (osdmap.is_destroyed(osd)) {
+ continue;
+ }
osds[hostname->second].push_back(osd);
}