]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: allow osd spec removal 43821/head
authorSage Weil <sage@newdream.net>
Fri, 5 Nov 2021 15:39:07 +0000 (11:39 -0400)
committerSage Weil <sage@newdream.net>
Tue, 9 Nov 2021 15:19:42 +0000 (10:19 -0500)
commitbda5c304f33cb7a401a289d92f35b5d15f2fce15
treed8ec8673d0da90fde88a3d9f02ae8535be4a7924
parent575b7c9a98608c4f266d8e406118544916f1b8d6
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>
src/pybind/mgr/cephadm/module.py