If the disk being zapped is used by lvm (if it contains the
lvm label and hasn't been pvremove'd) it's safer to simply
bail out of zapping it than attempt teardown through a force
pvremove, because the disk being zapped might be in fact in
use by some LV.
Closes-Bug: 1858519
Change-Id: I111475c5a4584a3e367c604ab51ce2ef3789ff7f
- if the device does not exists, the action failed with message:
'/dev/<device>: Device does not exists.'
Closes-Bug: #1885336
Change-Id: I417c0074fe64c2afceecdfb09b8673930087f65f
The new python3-ceph-common deb package (introduced in ceph octopus)
adds a new ceph directory (a parent package in python terms) in
/usr/lib/python3/dist-packages/ceph/. This results in a conflict with
charm-ceph-osd/lib/ceph/. For example, with the current import of
ceph.utils in hooks/ceph_hooks.py, Python finds no utils.py in
/usr/lib/python3/dist-packages/ceph/ and then stops searching.
Therefore, rename lib/ceph to lib/charms_ceph to avoid the conflict.
Depends-On: https://review.opendev.org/#/c/709226
Change-Id: I13ae7c048d8f1eef2ea64b13ae14b51dbfaaf3cd
Similar to how osdize in charms.ceph checks for already processed
devices we need to avoid checking if they are pristine or not.
Additionally, mapped LUKS devices need to be filtered from being zapped
as they may hold valuable data. They are only used as underlying devices
for device mapper and dmcrypt to provide a decrypted block device
abstration so if they really need to be zapped a mapping needs to be
removed first.
This change also pulls charms.ceph modifications.
Change-Id: I96b3d40b3f9e56681be142377e454b15f9e22be3
Co-Authored-By: Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com>
Co-Authored-By: Chris Procter <chris.procter@canonical.com>
Closes-Bug: 1781453
This action includes configuration for disk(s) to
zap, as well as an additional required flag for
the administrator to acknowledge pending data loss
Change-Id: I3106e2f10cf132a628aad025f73161b04215598e
Related-Bug: #1698154