Fix volume attach error in generic driver

The generic driver doesn't understand the new 'reserved'
volume state and errors out when it detects that state.

Closes-Bug: #1741568

Change-Id: Ic14186d47b4d16a03c5c1e52933be5fa4660ee28
This commit is contained in:
Ben Swartzlander 2018-01-05 16:32:53 -05:00
parent c4b59336c2
commit f28ef954ba
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ class GenericShareDriver(driver.ExecuteMixin, driver.ShareDriver):
volume = self.volume_api.get(context, volume['id'])
if volume['status'] == 'in-use':
return volume
elif volume['status'] != 'attaching':
elif volume['status'] not in ('attaching', 'reserved'):
raise exception.ManilaException(
_('Failed to attach volume %s') % volume['id'])
time.sleep(1)