]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm/schedule: choose an IP from a subnet list
authorSage Weil <sage@newdream.net>
Thu, 11 Mar 2021 23:47:24 +0000 (18:47 -0500)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2021 23:20:34 +0000 (19:20 -0400)
commit48d33f8a1b30a5d0b88c5e50f9a7d22c7e07a1d2
treec8fac33e3a14c4b47405109f1ca93ee158ae1c73
parent4841093c7643c907934c684800a44e85ce873990
mgr/cephadm/schedule: choose an IP from a subnet list

Choose an IP from the subnet list provided by the ServiceSpec.

A few caveats:
- we ignore hosts that don't have IPs in the given subnet
- the subnet matching is STRICT.  That is, the CIDR name has to exactly
match what is configured on the host.  That means you can't just say 10/8
to match any 10.whatever addres--you need the exactly network on the host
(e.g, 10.1.2.0/24).
- If you modify a servicespec and change the networks when there are
already deployed daemons, we will try to deploy the new instances on
the same ports but bound to a specific IP instead of *.  Which will fail.
You need to remove the service first, or remove the old daemons manually
so that creating new ones will succeed.

Signed-off-by: Sage Weil <sage@newdream.net>
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/schedule.py
src/pybind/mgr/cephadm/serve.py
src/pybind/mgr/cephadm/services/cephadmservice.py
src/pybind/mgr/cephadm/tests/test_scheduling.py