It is currently possible to create a volume attachment for a server
when the volume is in error status because of the override logic
in the _attachment_reserve method. What results is that the volume
attach operation fails in nova-compute which rolls back and deletes
the volume attachment, which puts the volume into 'available' status
because it no longer has any attachments, which in fact it should
have never allowed the attachment create/reserve in the first place.
This updates the override logic such that a volume without any
attachments which is in an invalid status will result in an error
being raised.
Change-Id: Id9cf2f510684cd296ffbcaf53d11889cfe8973b9
Closes-Bug: #1785050