update-status hook, list-disk action breaks when device has no device_node in udev
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph OSD Charm |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The update status hook and the list-disk action throw an exception when udev returns a device without a "device_node", as can happen with nvme devices. Example:
Traceback (most recent call last):
File "hooks/
assess_status()
File "hooks/
for dev in list(set(
File "lib/ceph/
if block_type in device.device_node:
TypeError: argument of type 'NoneType' is not iterable
This happens on calls to unmounted_disks (https:/
This code is invoked at the end of all hooks via 'assess_status' (https:/
In our client case, this happen when pyudev returns a NVMe device that has device_node as None, like this:
Device(
device.device_node is None => True
We identified the issue with revision 292 (19.07), but the code in master seems the same (all the links above)
Changed in charm-ceph-osd: | |
milestone: | none → 20.05 |
Changed in charm-ceph-osd: | |
status: | Fix Committed → Fix Released |
commenting so the field-high subscribers are properly notified.