Comment 0 for bug 1832444

Revision history for this message
Trent Lloyd (lathiat) wrote :

== Problem description ==

If a device is initialized as an LVM PV, but does not yet have a VG created on it, is_active_bluestore_device crashes out with "list index out of range". This causes various tasks to fail such as setting up an OSD from any hook (config_changed, etc) as well as the actions add-disk, zap-disk and list-disks

This occurs specifically after destroying an OSD using "ceph-volume lvm destroy --osd-id N --destroy" which will cleanup both the LV and VGs as appropriate, but does not run "pvremove".

In this case, "pvdisplay" shows the header "--- NEW Physical volume ---" and a "VG Name" which is blank.

This can affect the DB device as well as the OSD device, as the VG is also removed from the DB device if it was the last one.

We also cannot use the zap-disk action to fix this situation, since that action is broken by this issue.

== Workaround ==

Manually remove the PV header, using pvremove

pvremove /dev/xxx