/dev/sdb got mounted root, 'guess' algorithm exludes /dev/sda (among others)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
swift-storage (Juju Charms Collection) |
Fix Released
|
Low
|
Chris Glass |
Bug Description
Full unit log: http://
for some reason on a juju (1.20.2 prerelease) + maas (1.6.0+
/dev/sda was free and could have been used, but the charm didn't like this in it's 'guess' algorithm.
ubuntu@bohr:~$ tail -30 /var/log/
2014-07-29 20:29:34 INFO install GPT data structures destroyed! You may now partition the disk using fdisk or
2014-07-29 20:29:34 INFO install other utilities.
2014-07-29 20:29:34 INFO install Warning: The kernel is still using the old partition table.
2014-07-29 20:29:34 INFO install The new table will be used at the next reboot.
2014-07-29 20:29:34 INFO install The operation has completed successfully.
2014-07-29 20:29:34 INFO install 1+0 records in
2014-07-29 20:29:34 INFO install 1+0 records out
2014-07-29 20:29:34 INFO install 1048576 bytes (1.0 MB) copied, 0.00211706 s, 495 MB/s
2014-07-29 20:29:34 INFO install 100+0 records in
2014-07-29 20:29:34 INFO install 100+0 records out
2014-07-29 20:29:34 INFO install 51200 bytes (51 kB) copied, 0.00456763 s, 11.2 MB/s
2014-07-29 20:29:34 INFO install mkfs.xfs: cannot open /dev/sdb: Device or resource busy
2014-07-29 20:29:34 INFO install <open file '/proc/partitions', mode 'r' at 0x7ffedc45fdb0>
2014-07-29 20:29:34 INFO install Traceback (most recent call last):
2014-07-29 20:29:34 INFO install File "/var/lib/
2014-07-29 20:29:34 INFO install main()
2014-07-29 20:29:34 INFO install File "/var/lib/
2014-07-29 20:29:34 INFO install hooks.execute(
2014-07-29 20:29:34 INFO install File "/var/lib/
2014-07-29 20:29:34 INFO install self._hooks[
2014-07-29 20:29:34 INFO install File "/var/lib/
2014-07-29 20:29:34 INFO install setup_storage()
2014-07-29 20:29:34 INFO install File "/var/lib/
2014-07-29 20:29:34 INFO install mkfs_xfs(dev)
2014-07-29 20:29:34 INFO install File "/var/lib/
2014-07-29 20:29:34 INFO install check_call(cmd)
2014-07-29 20:29:34 INFO install File "/usr/lib/
2014-07-29 20:29:34 INFO install raise CalledProcessEr
2014-07-29 20:29:34 INFO install subprocess.
2014-07-29 20:29:34 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1
ubuntu@bohr:~$ ll /dev/sd*
brw-rw---- 1 root disk 8, 0 Jul 29 20:27 /dev/sda
brw-rw---- 1 root disk 8, 1 Jul 29 20:27 /dev/sda1
brw-rw---- 1 root disk 8, 2 Jul 29 20:27 /dev/sda2
brw-rw---- 1 root disk 8, 16 Jul 29 20:29 /dev/sdb
brw-rw---- 1 root disk 8, 17 Jul 29 20:27 /dev/sdb1
ubuntu@bohr:~$ ll /proc/partitions
-r--r--r-- 1 root root 0 Jul 29 20:34 /proc/partitions
ubuntu@bohr:~$ cat /proc/partitions
major minor #blocks name
8 0 119454720 sda
8 1 118405103 sda1
8 2 1047552 sda2
8 16 117220824 sdb
8 17 117219800 sdb1
# /dev/sdb is root (!)
# The landscape cloud-installer tells the charm to use sd[a-z] more or less.
ubuntu@bohr:~$ mount |grep sdb
/dev/sdb1 on / type ext4 (rw)
ubuntu@bohr:~$ mount |grep sda
ubuntu@bohr:~$ ll /dev/sda*
brw-rw---- 1 root disk 8, 0 Jul 29 20:27 /dev/sda
brw-rw---- 1 root disk 8, 1 Jul 29 20:27 /dev/sda1
brw-rw---- 1 root disk 8, 2 Jul 29 20:27 /dev/sda2
Related branches
- Liam Young (community): Approve
-
Diff: 68 lines (+45/-1)2 files modifiedcharmhelpers/contrib/storage/linux/utils.py (+3/-0)
tests/contrib/storage/test_linux_storage_utils.py (+42/-1)
- Liam Young (community): Approve
-
Diff: 1611 lines (+968/-90)21 files modifiedMakefile (+8/-2)
charm-helpers.yaml (+1/-0)
hooks/charmhelpers/contrib/hahelpers/cluster.py (+12/-2)
hooks/charmhelpers/contrib/network/ip.py (+156/-0)
hooks/charmhelpers/contrib/openstack/amulet/deployment.py (+61/-0)
hooks/charmhelpers/contrib/openstack/amulet/utils.py (+275/-0)
hooks/charmhelpers/contrib/openstack/context.py (+95/-22)
hooks/charmhelpers/contrib/openstack/ip.py (+75/-0)
hooks/charmhelpers/contrib/openstack/neutron.py (+14/-0)
hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg (+6/-1)
hooks/charmhelpers/contrib/openstack/templating.py (+22/-23)
hooks/charmhelpers/contrib/openstack/utils.py (+11/-3)
hooks/charmhelpers/contrib/storage/linux/ceph.py (+1/-1)
hooks/charmhelpers/contrib/storage/linux/utils.py (+4/-0)
hooks/charmhelpers/core/fstab.py (+116/-0)
hooks/charmhelpers/core/hookenv.py (+5/-4)
hooks/charmhelpers/core/host.py (+32/-12)
hooks/charmhelpers/fetch/__init__.py (+33/-16)
hooks/charmhelpers/fetch/bzrurl.py (+2/-1)
hooks/swift_storage_utils.py (+11/-3)
unit_tests/test_swift_storage_utils.py (+28/-0)
- OpenStack Charmers: Pending requested
-
Diff: 68 lines (+45/-1)2 files modifiedcharmhelpers/contrib/storage/linux/utils.py (+3/-0)
tests/contrib/storage/test_linux_storage_utils.py (+42/-1)
Changed in swift-storage (Juju Charms Collection): | |
assignee: | nobody → Chris Glass (tribaal) |
status: | Triaged → In Progress |
The charm makes the assumption that the first disk is off limits; I guess its possible to look at devices and see if they are in use and exclude that way instead - ceph does something like this.