With MAAS 1.9a2, lvm disks are not correctly skipped when in-use by ceph disk prepare.

Bug #1513009 reported by Mark Shuttleworth
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ceph (Juju Charms Collection)
Fix Released
High
Chris Holcombe
ceph-osd (Juju Charms Collection)
Fix Released
High
Chris Holcombe

Bug Description

Today's gmaas autopilot run seemed to stumble on Ceph. MAAS 1.9b2 might be an issue.

ceph-disk-prepare skips disks that are already mounted, however it misses a new case where maas 1.9 now uses lvm by default.

One approach would be to make sure the disk is not a physical volume in an active volume group with mounted logical volumes as another conditional to check.

Related branches

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :
Revision history for this message
David Britton (dpb) wrote :

Indeed.

http://paste.ubuntu.com/13102405/

unit-ceph-1[20040]: 2015-11-04 08:46:46 INFO unit.ceph/1.mon-relation-changed logger.go:40 ceph-disk: Error: Device /dev/sda1 is in use by a device-mapper mapping (dm-crypt?): dm-0

Revision history for this message
David Britton (dpb) wrote :

I believe by default, maas 1.9 now uses LVM, which probably means that this check in ceph/charmhelpers is no longer sufficient (as the device is no longer mounted, the LV ends up getting mounted):

    if not os.path.exists(dev):
        log('Path {} does not exist - bailing'.format(dev))
        return

    if not is_block_device(dev):
        log('Path {} is not a block device - bailing'.format(dev))
        return

    if (is_osd_disk(dev) and not reformat_osd):
        log('Looks like {} is already an OSD, skipping.'.format(dev))
        return

    if is_device_mounted(dev):
        log('Looks like {} is in use, skipping.'.format(dev))
        return

information type: Proprietary → Public
affects: ceph (Juju Charms Collection) → ceph-osd (Juju Charms Collection)
summary: - Ceph installation failed on several machines with OSA
+ With MAAS 1.9a2, lvm disks are not correctly skipped when in-use by ceph
+ disk prepare.
tags: added: kanban-cross-team landscape
no longer affects: landscape
Revision history for this message
David Britton (dpb) wrote :

FYI to others who hit this, I believe there is a global switch in maas 1.9 to change to 'flat layout' that should workaround the issue.

description: updated
Changed in ceph-osd (Juju Charms Collection):
status: New → Confirmed
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1513009] Re: With MAAS 1.9a2, lvm disks are not correctly skipped when in-use by ceph disk prepare.

MAAS 1.9 will do LVM and bcache and RAID, and the Autopilot does need to
support those *well*, not just document a workaround.

Mark

James Page (james-page)
Changed in ceph-osd (Juju Charms Collection):
importance: Undecided → High
Changed in ceph (Juju Charms Collection):
status: New → Triaged
Changed in ceph-osd (Juju Charms Collection):
status: Confirmed → Triaged
Changed in ceph (Juju Charms Collection):
importance: Undecided → High
milestone: none → 16.01
Changed in ceph-osd (Juju Charms Collection):
milestone: none → 16.01
tags: removed: kanban-cross-team
James Page (james-page)
Changed in ceph (Juju Charms Collection):
assignee: nobody → Chris Holcombe (xfactor973)
Changed in ceph-osd (Juju Charms Collection):
assignee: nobody → Chris Holcombe (xfactor973)
Revision history for this message
Chris Holcombe (xfactor973) wrote :

I have a WIP branch for this that I've linked. I'm still giving some thought to how to properly test it

James Page (james-page)
Changed in ceph-osd (Juju Charms Collection):
milestone: 16.01 → 16.04
Changed in ceph (Juju Charms Collection):
milestone: 16.01 → 16.04
Revision history for this message
Wade Fitzpatrick (wade-fitzpatrick-p) wrote :

My servers have the following disk configuration:

/dev/sda - 240GB SSD
/dev/sdb - 1TB SATA
/dev/sdc - 1TB SATA
/dev/sdd - 1TB SATA
/dev/sde - 1TB SATA

What I want to do is use LVM to partition 40GB of the SSD for a root volume then use the rest of it for Ceph but it doesn't look like the installer will allow that because it seems to want whole disks.

I worked around this bug by partitioning the SSD with a /boot on /dev/sda1 which gets mounted so the checks in the ceph installer skip over that disk. How can I tell it to use the other 200GB of the SSD for ceph though?

Revision history for this message
Chris Holcombe (xfactor973) wrote :

@wade-fitzpatrick-p sorry for the delayed response. The installer will allow you to specify a directory as your OSD so what you could do is mount your 200GB SSD to some mount point and then tell the charm to consume that mount point.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph (master)

Reviewed: https://review.openstack.org/308295
Committed: https://git.openstack.org/cgit/openstack/charm-ceph/commit/?id=57a305f40e422e99897d59d75e3f28e47d24feb6
Submitter: Jenkins
Branch: master

commit 57a305f40e422e99897d59d75e3f28e47d24feb6
Author: Chris MacNaughton <email address hidden>
Date: Wed Apr 20 08:12:00 2016 -0400

    Charmhelpers Sync, fixes mount detection

    This charmhelpers change corrects how we detect
     if a device is mounted

    Closes-Bug: #1513009
    Closes-Bug: #1571840

    Change-Id: I9310e7aae1957d6c44e6a3e48c4426e34960a63a

Changed in ceph (Juju Charms Collection):
status: Triaged → Fix Committed
Changed in ceph-osd (Juju Charms Collection):
status: Triaged → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-osd (master)

Reviewed: https://review.openstack.org/308296
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-osd/commit/?id=5d30ecf502effbae2e35363fbd89e04a3cadf51c
Submitter: Jenkins
Branch: master

commit 5d30ecf502effbae2e35363fbd89e04a3cadf51c
Author: Chris MacNaughton <email address hidden>
Date: Wed Apr 20 08:12:27 2016 -0400

    Charmhelpers Sync, fixes mount detection

    This charmhelpers change corrects how we detect
     if a device is mounted

    Closes-Bug: #1513009
    Closes-Bug: #1571840

    Change-Id: I5c42fba38d11dd1cc02723dbe8e1b6bae7d5d35d

James Page (james-page)
Changed in ceph-osd (Juju Charms Collection):
status: Fix Committed → Fix Released
Changed in ceph (Juju Charms Collection):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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