In cinder.manager do_attach we have a check to make sure the
supplied instance id is a valid UUID which is great, but if it's
not we just raise and dump out, leaving the volume in an attaching
state.
We should update the status to error_attaching in this case and then
raise/return.
Fixes bug:
1192370
Change-Id: Ia759ea7a387544913953ca84e9ed927480c4edfd
{"instance_uuid": instance_uuid,
"status": "attaching"})
- # TODO(vish): refactor this into a more general "reserve"
- # TODO(sleepsonthefloor): Is this 'elevated' appropriate?
if not uuidutils.is_uuid_like(instance_uuid):
+ self.db.volume_update(context,
+ volume_id,
+ {'status': 'error_attaching'})
raise exception.InvalidUUID(uuid=instance_uuid)
try: