Project

General

Profile

Actions

Bug #64428

closed

cephadm: host filtering with label and host pattern only uses the label

Added by Adam King 2 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
squid, reef, quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

While the placement validation does not allow explicit hosts with label/host pattern, it does allow the label and host pattern in one placement. However, currently when both are provided, only the label is used.

With hosts/labels

[ceph: root@vm-00 /]# ceph orch host ls
HOST   ADDR             LABELS  STATUS  
vm-00  192.168.122.7    _admin          
vm-01  192.168.122.171  foo            
vm-02  192.168.122.147  foo            
3 hosts in cluster

and spec 

[ceph: root@vm-00 /]# cat ne.yaml
service_type: node-exporter
service_name: node-exporter
placement:
  host_pattern: 'vm-0[0-1]'

you get the expected placement on vm-00 and vm-01

[ceph: root@vm-00 /]# ceph orch ps --daemon-type node-exporter
NAME                 HOST   PORTS   STATUS         REFRESHED  AGE  MEM USE  MEM LIM  VERSION  IMAGE ID      CONTAINER ID  
node-exporter.vm-00  vm-00  *:9100  running (23s)    17s ago  23s    3636k        -  1.5.0    0da6a335fe13  f83e88caa7e0  
node-exporter.vm-01  vm-01  *:9100  running (21h)     2m ago  21h    16.1M        -  1.5.0    0da6a335fe13  a5153c378449  

but if I add label to the placement, while still leaving in the host pattern

[ceph: root@vm-00 /]# cat ne.yaml
service_type: node-exporter
service_name: node-exporter
placement:
  label: foo
  host_pattern: 'vm-0[0-1]'

you would expect to only get vm-01 at this point, as it's the only host that matches both pieces of the placement, but instead you get both vm-01 and vm-02

[ceph: root@vm-00 /]# ceph orch ps --daemon-type node-exporter
NAME                 HOST   PORTS   STATUS         REFRESHED  AGE  MEM USE  MEM LIM  VERSION  IMAGE ID      CONTAINER ID  
node-exporter.vm-01  vm-01  *:9100  running (21h)     4m ago  21h    16.1M        -  1.5.0    0da6a335fe13  a5153c378449  
node-exporter.vm-02  vm-02  *:9100  running (23s)    18s ago  23s    5410k        -  1.5.0    0da6a335fe13  ddd1e643e341  


Related issues 3 (0 open3 closed)

Copied to Orchestrator - Backport #64687: squid: cephadm: host filtering with label and host pattern only uses the labelResolvedAdam KingActions
Copied to Orchestrator - Backport #64688: quincy: cephadm: host filtering with label and host pattern only uses the labelResolvedAdam KingActions
Copied to Orchestrator - Backport #64689: reef: cephadm: host filtering with label and host pattern only uses the labelResolvedAdam KingActions
Actions #1

Updated by Adam King 2 months ago

  • Backport set to reef, quincy
  • Pull request ID set to 55587
Actions #2

Updated by Adam King about 2 months ago

  • Status changed from In Progress to Pending Backport
  • Backport changed from reef, quincy to squid, reef, quincy
Actions #3

Updated by Backport Bot about 2 months ago

  • Copied to Backport #64687: squid: cephadm: host filtering with label and host pattern only uses the label added
Actions #4

Updated by Backport Bot about 2 months ago

  • Copied to Backport #64688: quincy: cephadm: host filtering with label and host pattern only uses the label added
Actions #5

Updated by Backport Bot about 2 months ago

  • Copied to Backport #64689: reef: cephadm: host filtering with label and host pattern only uses the label added
Actions #6

Updated by Backport Bot about 2 months ago

  • Tags set to backport_processed
Actions #7

Updated by Adam King about 1 month ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF