prepare_disks_and_activate pristine device checks break with udev path based configuration

Bug #1832830 reported by Gábor Mészáros
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph OSD Charm
Triaged
Wishlist
Unassigned

Bug Description

This report is connected to #1831871

Same issue, this time at the device activation phase.

With the following setup:
$ juju config ceph-osd osd-devices
/dev/disk/ceph/osd-sdc /dev/disk/ceph/osd-sdd
$ juju config ceph-osd-std osd-journal
/dev/disk/ceph/journal-sda /dev/disk/ceph/journal-sdb

created by a custom udev rule, the charm will find the journal (and possibly the osd) devices non-pristine, as they have no partition mounted on those drives and they are listed with their udev names in the juju config.

Fix is simple, check the realpath of the drives during the activation function.
Something like
    devices = [os.path.realpath(dev) for dev in devices]
to be added in the prepare_disks_and_activate().

https://github.com/openstack/charm-ceph-osd/blob/master/hooks/ceph_hooks.py#L512-L520

Tags: 4010
description: updated
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

It's not clear whether this is a bug that breaks the charm in some way (e.g. hook failure) or leaves the underlying payload misconfigured, or whether it is a feature request. Please could you clarify further and include details of breakage/mis-configuration. Thanks.

Changed in charm-ceph-osd:
status: New → Incomplete
Revision history for this message
Gábor Mészáros (gabor.meszaros) wrote :

it happens during the device activation phase, as I referenced in the code too.
The devices will get flagged as non-pristine, because they are not found. The path check must verify the real path of the provided configuration, as it can be hidden behind a symlink (udev or manual).

Revision history for this message
Gábor Mészáros (gabor.meszaros) wrote :

the underlying payload is not even touched.
this is not a feature request, this is a wrong behavior of the charm.
there is no hook failure, the application status will be 'non-pristine devices found', etc. and the charm execution is paused there.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Okay, so the charm isn't in an error state, but this isn't a configuration that it has been coded to (currently) handle. This is a wishlist item (i.e. a new feature to handle a previously unspecified configuration) -- this doesn't mean it is not important, nor that it shouldn't be implemented, just that its not a bug in terms of incorrect behaviour.

Changed in charm-ceph-osd:
importance: Undecided → Wishlist
status: Incomplete → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-ceph-osd (master)

Change abandoned by Gábor Mészáros (<email address hidden>) on branch: master
Review: https://review.opendev.org/665347

Revision history for this message
Drew Freiberger (afreiberger) wrote :

Related bug where I've provided some workarounds: https://bugs.launchpad.net/charm-ceph-osd/+bug/1933914

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.