Relation departed re-creates OSDs before removing the unit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph OSD Charm |
New
|
Undecided
|
Unassigned |
Bug Description
While running a ceph-osd decryption, we did the following:
1. out the OSDs
2. purge the OSD and host from ceph
3. ceph-volume lvm zap, lvremove, pvremove
4. systemctl disable vaultlocker-
5. run-action zap-disk
until this point ceph-osd unit is in blocked state with no devices and all OSD purged:
ceph-osd/1 blocked idle 22 10.35.61.117 No block devices detected using current configuration
Next step we performed was remove-unit, which resulted in the ceph-osd re-adding the 4 OSDs and once completed - the unit was successfully removed from juju => had to re-run steps 1-3 manually to cleanup what was added by the charm. Re-adding the ceph-osd unit then successfully created the OSD.
The thing here is - removing the unit should not add the OSDs, checking the debug-log I can see the following:
2020-11-26 12:15:57 DEBUG mon-relation-
2020-11-26 12:15:58 DEBUG mon-relation-
running relation-departed hooks creates new OSDs in the unit, where it should only remove the unit and cleanup after itself. Attaching the whole ceph-osd juju unit log for review.
ceph-osd revision: 304
ceph-mon revision: 49
cloud: bionic-ussuri