Project

General

Profile

Actions

Bug #54026

closed

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

Added by Paul Cuzner about 2 years ago. Updated about 2 years 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

Actions #1

Updated by Sebastian Wagner about 2 years ago

  • Tags set to low-hanging-fruit
Actions #2

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?

Actions #3

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.

Actions #4

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.

Actions #5

Updated by Adam King about 2 years ago

  • Assignee set to Redouane Kachach Elhichou
Actions #6

Updated by Redouane Kachach Elhichou about 2 years ago

  • Status changed from New to Fix Under Review
Actions #8

Updated by Redouane Kachach Elhichou about 2 years ago

  • Pull request ID set to 44895
Actions #9

Updated by Redouane Kachach Elhichou about 2 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF