add-disk and zap-disk actions don't work for mounted filesystem paths
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph OSD Charm |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
When trying to replace a failed disk on an environment with 19.04 charms and using osd-devices=
The process would typically be:
juju run-action --wait ceph-osd/X zap-disk devices=
* replace disk, reformat, and mount *
juju run-action --wait ceph-osd/X add-disk osd-devices=
unfortunately, zap-disk action bombs out immediately if devices is not a block device.
zap-disk is the only way in the charm to remove that path from the kv() db of known/configured disks.
Suggest zap-disk have the ability to reduce the db disks values by the path provided at a very minimum so that add-disk doesn't skip the re-add of the disk.
Current workaround to allow for add-disk on already-configured path:
1. login to unit
2. cd /var/lib/
3. apt-get install sqlite
4. sudo sqlite3 .unit-state.db
5. enter the following in sqlite prompt:
select data from kv where key='osd-devices';
*capture output for update command*
update kv set data='<list construct minus the path to zap>' where key='osd-devices';
select data from kv where key='osd-devices';
*validate setting is as expected*
.quit
Changed in charm-ceph-osd: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
I've also found that add-disk does not function properly on an already mounted filesystem. It gets through the chown/chmod and ceph-osd prepare command, but fails at finding the block UUID and adding to hdparm and bombs out before updating the relation data to ceph-mon.