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:
홍인용
2025-01-21 20:33:00 +09:00
committed by Goutham Pacha Ravi
parent 3fede84e66
commit c5206fe3ec
2 changed files with 9 additions and 0 deletions

View File

@@ -455,6 +455,7 @@ class PoolState(HostState):
provisioned_capacity += instance['size'] or 0
return provisioned_capacity
@utils.synchronized("update_from_share_capability")
def update_from_share_capability(
self, capability, service=None, context=None):
"""Update information about a pool from its share_node info."""

View File

@@ -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>`_.