resolving symlinks specified in osd-devices results in non-persistent device entries being used for pristinity checking
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph OSD Charm |
Fix Released
|
High
|
James Page |
Bug Description
In order to use persistent device names persistent device symlinks are used in the osd-devices charm config as follows: /dev/disk/
However, in local unitdb they are listed as /dev/bcache<number> because of this code that resolves symlinks:
https:/
if os.path.
After a reboot those /dev/bcache<number> entries often get re-shuffled due to how the kernel device enumeration works and the unitdb check for "don't touch devices that have already been processed" becomes invalid.
https:/
For example, those entries:
sqlite3 .unit-state.db
sqlite> select * from kv;
# ...
osd-devices|
May not match the output of `tree /dev/disk/
There may be some areas of this charm code that compare those device values without dereferencing them first assuming that get_devices() have already done this previously.
We need to consider retaining persistent device symlink usage and in any places where there needs to be a device path comparison we need to use something like: realpath_
Changed in charm-ceph-osd: | |
status: | New → Triaged |
importance: | Undecided → High |
description: | updated |
description: | updated |
Changed in charm-ceph-osd: | |
assignee: | nobody → Liam Young (gnuoy) |
Changed in charm-ceph-osd: | |
milestone: | none → 18.08 |
Changed in charm-ceph-osd: | |
status: | Fix Committed → Fix Released |
Dmitrii - I thought the kernel device enumeration for bcache devices had been fixed, so that we do get consistent bcache device naming between reboots?