]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: allow osd spec removal
authorSage Weil <sage@newdream.net>
Fri, 5 Nov 2021 15:39:07 +0000 (11:39 -0400)
committerSebastian Wagner <sewagner@redhat.com>
Wed, 17 Nov 2021 10:25:57 +0000 (11:25 +0100)
commit82b97ced954217feead790ac604a4bccc121fb90
treedec74707120a79f786aa093d703c6bfe1b8b59d0
parent5317bdc107b1c7d6260320ad8cac2adb18f89c9d
mgr/cephadm: allow osd spec removal

OSD specs/drivegroups are essentially templates for OSD creation but do
not map to the full lifecycle of the OSDs that they create.  When a spec
is removed, remove it immediately.

If no --force is provided, the error lists which OSDs will be left behind.
If --force is passed, the service is removed.

This leaves behind a few oddities:

- When you list services, OSDs that were created by the drivegroup may
  still exist, causing the drivegroup to appear in the list as
  unmanaged services.
- If you create a new drivegroup with the same name, the prior OSDs will
  appear to belong to the new spec instance, regardless of whether the
  spec/drivegroup parameters are the same.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit bda5c304f33cb7a401a289d92f35b5d15f2fce15)
src/pybind/mgr/cephadm/module.py