Actions
Bug #64428
closedcephadm: host filtering with label and host pattern only uses the label
% Done:
0%
Source:
Tags:
backport_processed
Backport:
squid, reef, quincy
Regression:
No
Severity:
3 - minor
Reviewed:
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
Actions