Actions
Bug #50444
closedhost labels order is random
% Done:
0%
Source:
Tags:
Backport:
pacific
Regression:
No
Severity:
4 - irritation
Reviewed:
Description
host labels are not stored in the order entered or a logical order like alphabetically. they stored in a randomized order.
[ceph: root@vm-00 /]# ceph orch host add vm-01 --labels=a,b,c,d,c Added host 'vm-01' [ceph: root@vm-00 /]# ceph orch host ls HOST ADDR LABELS STATUS vm-00 192.168.122.220 vm-01 vm-01 b a d c vm-02 vm-02 [ceph: root@vm-00 /]#
the list of labels is stored as set temporarily to remove duplicates here https://github.com/ceph/ceph/blob/master/src/python-common/ceph/deployment/hostspec.py#L48,#L57
this is the side effect of using sets to remove duplicates it randomizes the order.
Updated by Kefu Chai almost 3 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Sebastian Wagner almost 3 years ago
- Status changed from Pending Backport to Resolved
Actions