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:
parent
bdefef8c9a
commit
c47ec15457
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Fixed caching the volume list when volumes are in
|
||||||
|
use.
|
@ -65,7 +65,7 @@ OBJECT_CONTAINER_ACLS = {
|
|||||||
def _no_pending_volumes(volumes):
|
def _no_pending_volumes(volumes):
|
||||||
'''If there are any volumes not in a steady state, don't cache'''
|
'''If there are any volumes not in a steady state, don't cache'''
|
||||||
for volume in volumes:
|
for volume in volumes:
|
||||||
if volume['status'] not in ('available', 'error'):
|
if volume['status'] not in ('available', 'error', 'in-use'):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user