]> 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>
Wed, 17 Aug 2022 17:40:42 +0000 (13:40 -0400)
commitccdc075ad97d3ed5e58cb15713bd1b548e6e61ca
tree73fcca87398c43deae336b5d0b7dd7f220e45f2d
parent687c45bd409b307d831428c9ed7047f5c492cd6c
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>
(cherry picked from commit 7e8c07a3dd998dd3745b7f36919a21ca613484e4)
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