]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/cephadm: support for regex based host patterns
authorAdam King <adking@redhat.com>
Tue, 3 Oct 2023 23:06:10 +0000 (19:06 -0400)
committerAdam King <adking@redhat.com>
Fri, 15 Mar 2024 14:09:25 +0000 (10:09 -0400)
commitcb98509b0f2f2f565c6287e93bb6d544a79f5c9b
tree65c179cd39d6dc492d4a5a5f338e3c9531d070e9
parenta752c2f7898f53056d3000f2350a5865d1d67887
mgr/cephadm: support for regex based host patterns

For example, with hosts vm-00, vm-01, and vm-02
I was able to provide the placement

service_type: node-exporter
service_name: node-exporter
placement:
  host_pattern:
    pattern: vm-00|vm-02
    pattern_type: regex

and it placed the node-exporter daemons on vm-00
and vm-02 but not vm-01. Obviously there are more
advanced scenarios that justify this than listing
two hosts, but using "|" as an OR like that is an
example of something you can't do with the fnmatch
version of the host pattern

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit f27790b057db667c48b1840472046db3d6d9c5f1)

Conflicts:
src/pybind/mgr/rook/rook_cluster.py
src/pybind/mgr/cephadm/tests/test_scheduling.py
src/pybind/mgr/rook/rook_cluster.py
src/python-common/ceph/deployment/service_spec.py
src/python-common/ceph/tests/test_service_spec.py