Avoid conflicting update of provisioned_capacity_gb
While checking the capacity filter, it was found that the provisioned_capacity_gb value was instantaneously initialized to None in another thread, so Added synchronized lock to avoid conflicting update. Closes-Bug: #1871768 Change-Id: If3b1d3077e3018de79c782886f231184840f7086 Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
@@ -455,6 +455,7 @@ class PoolState(HostState):
|
|||||||
provisioned_capacity += instance['size'] or 0
|
provisioned_capacity += instance['size'] or 0
|
||||||
return provisioned_capacity
|
return provisioned_capacity
|
||||||
|
|
||||||
|
@utils.synchronized("update_from_share_capability")
|
||||||
def update_from_share_capability(
|
def update_from_share_capability(
|
||||||
self, capability, service=None, context=None):
|
self, capability, service=None, context=None):
|
||||||
"""Update information about a pool from its share_node info."""
|
"""Update information about a pool from its share_node info."""
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Added synchronized lock to fix issue where provisioned_capacity_gb value
|
||||||
|
was initialized to None immediately on another thread while checking
|
||||||
|
capacity filter, causing shared creation to fail due to conflicting
|
||||||
|
provisioned_capacity_gb updates.
|
||||||
|
please refer to `launchpad bug #1871768 <https://bugs.launchpad.net/manila/+bug/1871768>`_.
|
||||||
Reference in New Issue
Block a user