Ceph install fails when LVM is in use

Bug #1544862 reported by Wade Fitzpatrick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ceph (Juju Charms Collection)
New
Undecided
Unassigned

Bug Description

Trying to install ceph using Landscape on openstack-autopilot but I keep hitting this error:

unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 ceph-disk: Error: Device /dev/sda1 is in use by a device-mapper mapping (dm-crypt?): dm-0,dm-1
unit-ceph-2[18220]: 2016-02-12 05:51:49 ERROR unit.ceph/2.juju-log server.go:268 mon:2: Unable to initialize device: /dev/sda
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 Traceback (most recent call last):
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/mon-relation-changed", line 432, in <module>
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 hooks.execute(sys.argv)
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/charmhelpers/core/hookenv.py", line 672, in execute
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 self._hooks[hook_name]()
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/mon-relation-changed", line 235, in mon_relation
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 reformat_osd(), config('ignore-device-errors'))
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/ceph.py", line 346, in osdize
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 osdize_dev(dev, osd_format, osd_journal, reformat_osd, ignore_errors)
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/ceph.py", line 395, in osdize_dev
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 raise e
unit-ceph-2[18220]: 2016-02-12 05:51:49 INFO unit.ceph/2.mon-relation-changed logger.go:40 subprocess.CalledProcessError: Command '['ceph-disk-prepare', '--fs-type', u'xfs', '--zap-disk', u'/dev/sda']' returned non-zero exit status 1
unit-ceph-2[18220]: 2016-02-12 05:51:49 ERROR juju.worker.uniter.operation runhook.go:107 hook "mon-relation-changed" failed: exit status 1

The osdize_dev() hook only checks partition 1 (using sgdisk, so not terribly useful on MBR labels) and does not handle the case where partition 1 is an LVM volume.

This bug is similar to #1420094

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.