get_device_blkid (swift-storage-relation-joined hook) failure when inspecting in-use block devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Swift Storage Charm |
Fix Released
|
High
|
Unassigned | ||
swift-storage (Juju Charms Collection) |
Invalid
|
High
|
Unassigned |
Bug Description
On two ppc64el machines, the charm fails hard when querying a disk device which has a mounted partition:
2016-04-07 02:47:02 INFO swift-storage-
Trusty-Liberty + HWE-W Kernel
### From the swift-proxy unit log:
2016-04-07 02:47:01 INFO juju-log swift-storage:39: Valid ensured block devices: [u'/dev/sdb', u'/dev/sdc', u'/dev/sdd', u'/dev/sde']
2016-04-07 02:47:02 DEBUG juju-log swift-storage:39: Adding device 'b7f91dec-
2016-04-07 02:47:02 DEBUG juju-log swift-storage:39: Adding device 'd7349737-
2016-04-07 02:47:02 DEBUG juju-log swift-storage:39: Adding device 'cc76982f-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 INFO swift-storage-
2016-04-07 02:47:02 ERROR juju.worker.
### From the metal unit (manual repro):
ubuntu@
/dev/sda: UUID="9d31bdbc-
ubuntu@
/dev/sdb: UUID="b7f91dec-
ubuntu@
/dev/sdc: UUID="d7349737-
ubuntu@
/dev/sdd: UUID="cc76982f-
ubuntu@
ubuntu@
2
ubuntu@
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 264.3G 0 disk
sdb 8:16 0 264.3G 0 disk /srv/node/sdb
sdc 8:32 0 264.3G 0 disk /srv/node/sdc
sdd 8:48 0 264.3G 0 disk /srv/node/sdd
sde 8:64 0 264.3G 0 disk
├─sde1 8:65 0 8M 0 part
└─sde2 8:66 0 264.3G 0 part /
sr0 11:0 1 1024M 0 rom
...
### Confirmed same blkid behavior on a different unit with slightly different storage layout:
ubuntu@
ubuntu@
2
ubuntu@
/dev/sdb: UUID="3c766875-
ubuntu@
ubuntu@
2
ubuntu@
/dev/sdd: UUID="e4e8cb19-
ubuntu@
/dev/sde: UUID="c9db39ea-
ubuntu@
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 264.3G 0 disk
└─sda1 8:1 0 264.3G 0 part /
sdb 8:16 0 264.3G 0 disk
sdc 8:32 0 264.3G 0 disk
└─sdc1 8:33 0 8M 0 part
sdd 8:48 0 264.3G 0 disk
sde 8:64 0 264.3G 0 disk
sr0 11:0 1 1024M 0 rom
Changed in swift-storage (Juju Charms Collection): | |
milestone: | 16.10 → 17.01 |
Changed in charm-swift-storage: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in swift-storage (Juju Charms Collection): | |
status: | Confirmed → Invalid |
tags: | added: stable-backport |
Changed in charm-swift-storage: | |
status: | Fix Committed → Fix Released |
I think get_device_blkid() could do with a Try/Except instead of the If/Then:
https:/ /github. com/openstack/ charm-swift- storage/ blob/master/ lib/swift_ storage_ utils.py# L361