Project

General

Profile

Actions

Bug #50444

closed

host labels order is random

Added by Daniel Pivonka almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Low
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
pacific
Regression:
No
Severity:
4 - irritation
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.

Actions #1

Updated by Kefu Chai almost 3 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #2

Updated by Sebastian Wagner almost 3 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF