block-device doesn't accept whitelist

Bug #1313526 reported by Adam Collard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
swift-storage (Juju Charms Collection)
Fix Released
Medium
Unassigned

Bug Description

Setting block-device to a whitelist of many possible block device names leads to a traceback in the charm.

2014-04-27 11:09:27 INFO install Traceback (most recent call last):
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/install", line 91, in <module>
2014-04-27 11:09:27 INFO install main()
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/install", line 85, in main
2014-04-27 11:09:27 INFO install hooks.execute(sys.argv)
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/charmhelpers/core/hookenv.py", line 381, in execute
2014-04-27 11:09:27 INFO install self._hooks[hook_name]()
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/install", line 45, in install
2014-04-27 11:09:27 INFO install setup_storage()
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/swift_storage_utils.py", line 176, in setup_storage
2014-04-27 11:09:27 INFO install for dev in determine_block_devices():
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/swift_storage_utils.py", line 167, in determine_block_devices
2014-04-27 11:09:27 INFO install return [ensure_block_device(bd) for bd in bdevs]
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/misc_utils.py", line 57, in ensure_block_device
2014-04-27 11:09:27 INFO install if not is_block_device(bdev):
2014-04-27 11:09:27 INFO install File "/var/lib/juju/agents/unit-swift-storage-0/charm/hooks/charmhelpers/contrib/storage/linux/utils.py", line 17, in is_block_device
2014-04-27 11:09:27 INFO install return S_ISBLK(stat(path).st_mode)
2014-04-27 11:09:27 INFO install OSError: [Errno 2] No such file or directory: '/dev/vdb'

I would expect either is_block_device() to return False if the path doesn't exist, or the call is guarded around a exists() check.

tags: added: cloud-installer
Revision history for this message
James Page (james-page) wrote :

We implemented such a feature into the /next branch on rev 30; I'll see if that's SRU'able.

Revision history for this message
James Page (james-page) wrote :

My concern with this feature is that this can create a situation where the swift rings are not balanced, and as a result the swift deployment cannot complete; zones in swift rings must have currently have equal numbers of block devices; if you have a zone with less block devices, its not possible to balance the ring.

Changed in swift-storage (Juju Charms Collection):
importance: Undecided → Medium
status: New → Triaged
tags: added: openstack
Changed in swift-storage (Juju Charms Collection):
status: Triaged → Fix Released
milestone: none → 15.01
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.