block-storage-relation-changed retrieves incorrect device location

Bug #1516470 reported by Michael Nelson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
storage (Juju Charms Collection)
New
Undecided
Unassigned

Bug Description

Steps to reproduce:
 1) Deploy three units for the one service, all with a storage subordinate

Expected result:
 * All three units get storage assigned

Actual result:
 * First unit gets storage assigned successfully
 * Other units will (randomly - depends on ordering) be passed the device id (eg. /dev/vdb) of the first unit, which may not exist on the other units yet, and so they error with http://paste.ubuntu.com/13294514/

The cause seems to be because hooks/storage-provider.d/block-storage-broker/block-storage-relation-changed currently ends with:
{{{
device_path = common_util._get_from_relation(
    "block-storage", "block-device-path")
common_util.mount_volume(device_path, # Will wait for mountpoint
                         device_timeout=config_data.get('device_timeout'))
}}}

which gets the block-device-path from *any* block-storage relation (ie. not necessarily one for this unit) and tries to mount it.

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.