Consider 'in-use' a non-pending volume for caching

We don't cache volume list if one of the volumes is in pending state, as
otherwise we'd miss the cloud-side cache invalidation. However, active
volumes that are attached are in state "in-use" - so basically if you
had one active volume, the cache would never cache.

Change-Id: I03cbc1b814e4a5829936a22751ee81d52b83fb2e
This commit is contained in:
Monty Taylor 2015-12-08 13:06:56 -05:00
parent bdefef8c9a
commit c47ec15457
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
---
fixes:
- Fixed caching the volume list when volumes are in
use.

View File

@ -65,7 +65,7 @@ OBJECT_CONTAINER_ACLS = {
def _no_pending_volumes(volumes):
'''If there are any volumes not in a steady state, don't cache'''
for volume in volumes:
if volume['status'] not in ('available', 'error'):
if volume['status'] not in ('available', 'error', 'in-use'):
return False
return True