Bug #54026
closedthe sort sequence used by 'orch ps' is not in a natural sequence
0%
Description
orch ps returns a sequence like this;
osd.987
osd.988
osd.989
osd.99
osd.990
instead of
osd.987
osd.988
osd.989
osd.990
packages like natsort handle sequences like this correctly
Updated by Redouane Kachach Elhichou about 2 years ago
Thanks for reporting. Going with natural sort in general I think it's a good idea and would help the users to read easily the output. My only concern is about the behavior itself as the sorting wouldn't be consistent with other commands (such ash 'orch ls', etc).
I mean if we use natural sorting, shouldn't we use it everywhere for consistency and not only for the 'orch ps' command?
Updated by Sebastian Wagner about 2 years ago
indeed orch ps is special, as it typically lists all the 100's of osds, which is not the case for orch ls. But you're right for host ls and device ls, as users might have more than 11 numerically and sequentially named hosts.
Updated by Redouane Kachach Elhichou about 2 years ago
Ok, great. We had a discussion in upstream and we think that it makes more sense to implement the behavior per command since only a subset of commands would benefit from using a natural sorting algorithm. We will start by implementing it for "orch ps" and then extend the support to other commands with similar needs.
Updated by Adam King about 2 years ago
- Assignee set to Redouane Kachach Elhichou
Updated by Redouane Kachach Elhichou about 2 years ago
- Status changed from New to Fix Under Review
Updated by Redouane Kachach Elhichou about 2 years ago
related PR: https://github.com/ceph/ceph/pull/44895
Updated by Redouane Kachach Elhichou about 2 years ago
- Pull request ID set to 44895
Updated by Redouane Kachach Elhichou about 2 years ago
- Status changed from Fix Under Review to Resolved