Project

General

Profile

Bug #54026

the sort sequence used by 'orch ps' is not in a natural sequence

Added by Paul Cuzner 10 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Category:
cephadm
Target version:
% Done:

0%

Source:
Tags:
low-hanging-fruit
Backport:
quincy pacific
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

History

#1 Updated by Sebastian Wagner 10 months ago

  • Tags set to low-hanging-fruit

#2 Updated by Redouane Kachach Elhichou 10 months 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?

#3 Updated by Sebastian Wagner 10 months 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.

#4 Updated by Redouane Kachach Elhichou 10 months 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.

#5 Updated by Adam King 10 months ago

  • Assignee set to Redouane Kachach Elhichou

#6 Updated by Redouane Kachach Elhichou 10 months ago

  • Status changed from New to Fix Under Review

#8 Updated by Redouane Kachach Elhichou 9 months ago

  • Pull request ID set to 44895

#9 Updated by Redouane Kachach Elhichou 8 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF