]> git.apps.os.sepia.ceph.com Git - ceph.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>
Tue, 14 Nov 2023 21:04:47 +0000 (16:04 -0500)
commitf27790b057db667c48b1840472046db3d6d9c5f1
treecd94631d2363f9d339f82916bfa52cca83e3ebb5
parent473eadaa90a0b6022a53f496f5ee7c509d00f98a
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>
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