Comment 36 for bug 1069904

Revision history for this message
Jamie Strandboge (jdstrand) wrote : Re: No authentication on block device used for os-volume_boot

FYI, the folsom patch suffers from the same problem. After adjusting it to use:
+ def _validate_bdm(self, context, instance):
+ for bdm in self.db.block_device_mapping_get_all_by_instance(
+ context, instance['uuid']):
+ # NOTE(vish): For now, just make sure the volumes are accessible.
+ if bdm['snapshot_id'] is not None and \
+ 'volume_id' in bdm and bdm['volume_id'] is None:
+ try:
+ self.volume_api.get_snapshot(context, bdm['snapshot_id'])
+ except Exception:
+ raise exception.InvalidBDMSnapshot(id=bdm['snapshot_id'])
+ elif 'volume_id' in bdm and bdm['volume_id'] is not None:
+ try:
+ self.volume_api.get(context, bdm['volume_id'])
+ except Exception:
+ raise exception.InvalidBDMVolume(id=bdm['volume_id'])
+

it passes its testsuite as well (I would attach the patch, but I had to massage it a little for the version of Folsom in Ubuntu).