For unit-ceph-2 I removed all existing partitions on /dev/sdb (which had the swap partition on it and an old MBR) and re-deployed landscape. This time ceph-disk-prepare correctly partitions /dev/sdb. However it still errors out when trying to partition /dev/sdc (the CD drive), which causes the whole build to fail:
2015-02-10 20:59:24 INFO juju-log mon:60: Making dir /var/lib/charm/ceph root:root 555
2015-02-10 20:59:24 WARNING juju-log mon:60: Not a valid ipv6 address: 192.168.1.6
2015-02-10 20:59:24 WARNING juju-log mon:60: Not a valid ipv6 address: 192.168.1.7
2015-02-10 20:59:24 WARNING juju-log mon:60: Not a valid ipv6 address: 192.168.1.8
2015-02-10 20:59:24 INFO juju-log mon:60: Making dir /var/run/ceph root:root 755
2015-02-10 20:59:24 INFO juju-log mon:60: Making dir /var/lib/ceph/mon/ceph-portly-dust root:root 555
2015-02-10 20:59:24 INFO mon-relation-changed creating /var/lib/ceph/tmp/portly-dust.mon.keyring
2015-02-10 20:59:24 INFO mon-relation-changed added entity mon. auth auth(auid = 18446744073709551615 key=AQBAZ9pUaDONHRAAAvuwKk8AZY4TH2i2dGjSOQ== with 0 caps)
2015-02-10 20:59:24 INFO mon-relation-changed ceph-mon: mon.noname-a 192.168.1.6:6789/0 is local, renaming to mon.portly-dust
2015-02-10 20:59:24 INFO mon-relation-changed ceph-mon: set fsid to f288da7d-e3e4-441f-98f3-b2820e6aa776
2015-02-10 20:59:24 INFO mon-relation-changed ceph-mon: created monfs at /var/lib/ceph/mon/ceph-portly-dust for mon.portly-dust
2015-02-10 20:59:24 INFO mon-relation-changed ceph-mon-all stop/waiting
2015-02-10 20:59:24 INFO mon-relation-changed ceph-mon-all start/running
2015-02-10 20:59:34 INFO juju-log mon:60: Looks like /dev/sda is in use, skipping.
2015-02-10 20:59:34 INFO juju-log mon:60: Path /dev/vda does not exist - bailing
Reading package lists... Donerelation-changed
Building dependency tree lation-changed
Reading state information... Donetion-changed
2015-02-10 20:59:38 INFO mon-relation-changed Caution: invalid backup GPT header, but valid main header; regenerating
2015-02-10 20:59:38 INFO mon-relation-changed backup header from main header.
2015-02-10 20:59:38 INFO mon-relation-changed
2015-02-10 20:59:40 INFO mon-relation-changed ****************************************************************************
2015-02-10 20:59:40 INFO mon-relation-changed Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
2015-02-10 20:59:40 INFO mon-relation-changed verification and recovery are STRONGLY recommended.
2015-02-10 20:59:40 INFO mon-relation-changed ****************************************************************************
2015-02-10 20:59:40 INFO mon-relation-changed GPT data structures destroyed! You may now partition the disk using fdisk or
2015-02-10 20:59:40 INFO mon-relation-changed other utilities.
2015-02-10 20:59:40 INFO mon-relation-changed The operation has completed successfully.
2015-02-10 20:59:41 INFO mon-relation-changed The operation has completed successfully.
2015-02-10 20:59:42 INFO mon-relation-changed The operation has completed successfully.
2015-02-10 20:59:43 INFO mon-relation-changed meta-data=/dev/sdb1 isize=2048 agcount=4, agsize=8855487 blks
2015-02-10 20:59:43 INFO mon-relation-changed = sectsz=512 attr=2, projid32bit=0
2015-02-10 20:59:43 INFO mon-relation-changed data = bsize=4096 blocks=35421947, imaxpct=25
2015-02-10 20:59:43 INFO mon-relation-changed = sunit=0 swidth=0 blks
2015-02-10 20:59:43 INFO mon-relation-changed naming =version 2 bsize=4096 ascii-ci=0
2015-02-10 20:59:43 INFO mon-relation-changed log =internal log bsize=4096 blocks=17295, version=2
2015-02-10 20:59:43 INFO mon-relation-changed = sectsz=512 sunit=0 blks, lazy-count=1
2015-02-10 20:59:43 INFO mon-relation-changed realtime =none extsz=4096 blocks=0, rtextents=0
2015-02-10 20:59:44 INFO mon-relation-changed The operation has completed successfully.
2015-02-10 20:59:45 INFO juju-log mon:60: Path /dev/vdb does not exist - bailing
2015-02-10 20:59:45 INFO mon-relation-changed Problem opening /dev/sdc for reading! Error is 123.
Reading package lists... Donerelation-changed
Building dependency tree lation-changed
Reading state information... Donetion-changed
2015-02-10 20:59:49 INFO mon-relation-changed Traceback (most recent call last):
2015-02-10 20:59:49 INFO mon-relation-changed File "/usr/sbin/ceph-disk", line 2790, in <module>
2015-02-10 20:59:49 INFO mon-relation-changed main()
2015-02-10 20:59:49 INFO mon-relation-changed File "/usr/sbin/ceph-disk", line 2768, in main
2015-02-10 20:59:49 INFO mon-relation-changed args.func(args)
2015-02-10 20:59:49 INFO mon-relation-changed File "/usr/sbin/ceph-disk", line 1387, in main_prepare
2015-02-10 20:59:49 INFO mon-relation-changed zap(args.data)
2015-02-10 20:59:49 INFO mon-relation-changed File "/usr/sbin/ceph-disk", line 982, in zap
2015-02-10 20:59:50 INFO mon-relation-changed with file(dev, 'wb') as dev_file:
2015-02-10 20:59:50 INFO mon-relation-changed IOError: [Errno 123] No medium found: '/dev/sdc'
2015-02-10 20:59:50 ERROR juju-log mon:60: Unable to initialize device: /dev/sdc
2015-02-10 20:59:50 INFO mon-relation-changed Traceback (most recent call last):
2015-02-10 20:59:50 INFO mon-relation-changed File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/mon-relation-changed", line 312, in <module>
2015-02-10 20:59:50 INFO mon-relation-changed hooks.execute(sys.argv)
2015-02-10 20:59:50 INFO mon-relation-changed File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/charmhelpers/core/hookenv.py", line 508, in execute
2015-02-10 20:59:50 INFO mon-relation-changed self._hooks[hook_name]()
2015-02-10 20:59:50 INFO mon-relation-changed File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/mon-relation-changed", line 196, in mon_relation
2015-02-10 20:59:50 INFO mon-relation-changed reformat_osd(), config('ignore-device-errors'))
2015-02-10 20:59:50 INFO mon-relation-changed File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/ceph.py", line 327, in osdize
2015-02-10 20:59:50 INFO mon-relation-changed osdize_dev(dev, osd_format, osd_journal, reformat_osd, ignore_errors)
2015-02-10 20:59:50 INFO mon-relation-changed File "/var/lib/juju/agents/unit-ceph-2/charm/hooks/ceph.py", line 375, in osdize_dev
2015-02-10 20:59:50 INFO mon-relation-changed raise e
2015-02-10 20:59:50 INFO mon-relation-changed subprocess.CalledProcessError: Command '['ceph-disk-prepare', '--fs-type', u'xfs', '--zap-disk', u'/dev/sdc']' returned non-zero exit status 1
2015-02-10 20:59:50 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1
For unit-ceph-2 I removed all existing partitions on /dev/sdb (which had the swap partition on it and an old MBR) and re-deployed landscape. This time ceph-disk-prepare correctly partitions /dev/sdb. However it still errors out when trying to partition /dev/sdc (the CD drive), which causes the whole build to fail:
2015-02-10 20:59:24 INFO juju-log mon:60: Making dir /var/lib/charm/ceph root:root 555 ceph/mon/ ceph-portly- dust root:root 555 changed creating /var/lib/ ceph/tmp/ portly- dust.mon. keyring changed added entity mon. auth auth(auid = 184467440737095 51615 key=AQBAZ9pUaDO NHRAAAvuwKk8AZY 4TH2i2dGjSOQ= = with 0 caps) changed ceph-mon: mon.noname-a 192.168.1.6:6789/0 is local, renaming to mon.portly-dust changed ceph-mon: set fsid to f288da7d- e3e4-441f- 98f3-b2820e6aa7 76 changed ceph-mon: created monfs at /var/lib/ ceph/mon/ ceph-portly- dust for mon.portly-dust changed ceph-mon-all stop/waiting changed ceph-mon-all start/running changed changed Caution: invalid backup GPT header, but valid main header; regenerating changed backup header from main header. changed changed ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ****** changed Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk changed verification and recovery are STRONGLY recommended. changed ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ****** changed GPT data structures destroyed! You may now partition the disk using fdisk or changed other utilities. changed The operation has completed successfully. changed The operation has completed successfully. changed The operation has completed successfully. changed meta-data=/dev/sdb1 isize=2048 agcount=4, agsize=8855487 blks changed = sectsz=512 attr=2, projid32bit=0 changed data = bsize=4096 blocks=35421947, imaxpct=25 changed = sunit=0 swidth=0 blks changed naming =version 2 bsize=4096 ascii-ci=0 changed log =internal log bsize=4096 blocks=17295, version=2 changed = sectsz=512 sunit=0 blks, lazy-count=1 changed realtime =none extsz=4096 blocks=0, rtextents=0 changed The operation has completed successfully. changed Problem opening /dev/sdc for reading! Error is 123. changed changed Traceback (most recent call last): changed File "/usr/sbin/ ceph-disk" , line 2790, in <module> changed main() changed File "/usr/sbin/ ceph-disk" , line 2768, in main changed args.func(args) changed File "/usr/sbin/ ceph-disk" , line 1387, in main_prepare changed zap(args.data) changed File "/usr/sbin/ ceph-disk" , line 982, in zap changed with file(dev, 'wb') as dev_file: changed IOError: [Errno 123] No medium found: '/dev/sdc' changed Traceback (most recent call last): changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/mon- relation- changed" , line 312, in <module> changed hooks.execute( sys.argv) changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/charmhelp ers/core/ hookenv. py", line 508, in execute changed self._hooks[ hook_name] () changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/mon- relation- changed" , line 196, in mon_relation changed reformat_osd(), config( 'ignore- device- errors' )) changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/ceph. py", line 327, in osdize changed osdize_dev(dev, osd_format, osd_journal, reformat_osd, ignore_errors) changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/ceph. py", line 375, in osdize_dev changed raise e changed subprocess. CalledProcessEr ror: Command '['ceph- disk-prepare' , '--fs-type', u'xfs', '--zap-disk', u'/dev/sdc']' returned non-zero exit status 1
2015-02-10 20:59:24 WARNING juju-log mon:60: Not a valid ipv6 address: 192.168.1.6
2015-02-10 20:59:24 WARNING juju-log mon:60: Not a valid ipv6 address: 192.168.1.7
2015-02-10 20:59:24 WARNING juju-log mon:60: Not a valid ipv6 address: 192.168.1.8
2015-02-10 20:59:24 INFO juju-log mon:60: Making dir /var/run/ceph root:root 755
2015-02-10 20:59:24 INFO juju-log mon:60: Making dir /var/lib/
2015-02-10 20:59:24 INFO mon-relation-
2015-02-10 20:59:24 INFO mon-relation-
2015-02-10 20:59:24 INFO mon-relation-
2015-02-10 20:59:24 INFO mon-relation-
2015-02-10 20:59:24 INFO mon-relation-
2015-02-10 20:59:24 INFO mon-relation-
2015-02-10 20:59:24 INFO mon-relation-
2015-02-10 20:59:34 INFO juju-log mon:60: Looks like /dev/sda is in use, skipping.
2015-02-10 20:59:34 INFO juju-log mon:60: Path /dev/vda does not exist - bailing
Reading package lists... Donerelation-
Building dependency tree lation-changed
Reading state information... Donetion-changed
2015-02-10 20:59:38 INFO mon-relation-
2015-02-10 20:59:38 INFO mon-relation-
2015-02-10 20:59:38 INFO mon-relation-
2015-02-10 20:59:40 INFO mon-relation-
2015-02-10 20:59:40 INFO mon-relation-
2015-02-10 20:59:40 INFO mon-relation-
2015-02-10 20:59:40 INFO mon-relation-
2015-02-10 20:59:40 INFO mon-relation-
2015-02-10 20:59:40 INFO mon-relation-
2015-02-10 20:59:40 INFO mon-relation-
2015-02-10 20:59:41 INFO mon-relation-
2015-02-10 20:59:42 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:43 INFO mon-relation-
2015-02-10 20:59:44 INFO mon-relation-
2015-02-10 20:59:45 INFO juju-log mon:60: Path /dev/vdb does not exist - bailing
2015-02-10 20:59:45 INFO mon-relation-
Reading package lists... Donerelation-
Building dependency tree lation-changed
Reading state information... Donetion-changed
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:49 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 ERROR juju-log mon:60: Unable to initialize device: /dev/sdc
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 INFO mon-relation-
2015-02-10 20:59:50 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1