]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: fix handling of draining hosts with explicit placement specs
authorAdam King <adking@redhat.com>
Fri, 29 Jul 2022 20:10:09 +0000 (16:10 -0400)
committerAdam King <adking@redhat.com>
Thu, 11 Aug 2022 17:49:44 +0000 (13:49 -0400)
commit7e8c07a3dd998dd3745b7f36919a21ca613484e4
treed4c43880cbc3595e789c0f1a597c96b88d64a13a
parent5ab5ff46d6d799c46d8a1c01cc08068a22e4c9b5
mgr/cephadm: fix handling of draining hosts with explicit placement specs

Basically, if you have a placement that explicitly defines the hosts
to place on, and then add _no_schedule label to one of the hosts (which
should cause all daemons to be removed from the host) cpehadm will simply
fail to apply the spec, saying the host with the _no_schedule label is "Unknown".
This is due to the fact that we remove hosts with the _no_schedule label from
the pool of hosts the scheduler has to work with entirely. If we also provide
the scheduler with a list of currently draining hosts, it can handle this
better and the daemon can be drained off the host as expected.

Fixes: https://tracker.ceph.com/issues/56972
Signed-off-by: Adam King <adking@redhat.com>
src/pybind/mgr/cephadm/inventory.py
src/pybind/mgr/cephadm/migrations.py
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/schedule.py
src/pybind/mgr/cephadm/serve.py
src/pybind/mgr/cephadm/tests/test_scheduling.py
src/pybind/mgr/cephadm/tests/test_tuned_profiles.py
src/pybind/mgr/cephadm/tuned_profiles.py