list-disk action wrongly report journal_disk as non-pristine disk

Bug #1847988 reported by dongdong tao
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph OSD Charm
Fix Released
Medium
dongdong tao

Bug Description

If the osd-journal config use the journal device's symbol link as the value.
This will result the juju list-disk action wrongly report a journal device as non pristine.

list-disk action tried to exclude the journal device when it's trying to detect all the non-pristine devices.
we can see below code from :
----
 osd_journal = utils.get_journal_devices()
 for dev in list(set(ceph.utils.unmounted_disks()) - set(osd_journal)):
        if (not ceph.utils.is_active_bluestore_device(dev) and
                not ceph.utils.is_pristine_disk(dev)):
            non_pristine.append(dev)
----

The problem here is that ceph.utils.unmounted_disks() always return the real path while osd_journal might be just symbol link.

Tags: sts
Revision history for this message
dongdong tao (taodd) wrote :

I'll submit a patch soon

tags: added: sts
Revision history for this message
dongdong tao (taodd) wrote :
Revision history for this message
dongdong tao (taodd) wrote :

I'll fix the fail soon

Changed in charm-ceph-osd:
milestone: none → 19.10
assignee: nobody → dongdong tao (taodd)
importance: Undecided → Medium
status: New → In Progress
David Ames (thedac)
Changed in charm-ceph-osd:
milestone: 19.10 → 20.01
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-osd (master)

Reviewed: https://review.opendev.org/688372
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-osd/commit/?id=8ca701eb878abbe31034e871fc1508e9bed47093
Submitter: Zuul
Branch: master

commit 8ca701eb878abbe31034e871fc1508e9bed47093
Author: taodd <email address hidden>
Date: Mon Oct 14 18:18:10 2019 +0800

    Fix list-disk action wrongly report osd journal as the non-pristine device

    Change-Id: Ib117fc5797447ade75d50a7ff7dae5de473fe7b9
    Closes-Bug: #1847988

Changed in charm-ceph-osd:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-ceph-osd:
status: Fix Committed → Fix Released
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.