Skip to content

Commit ae39923

Browse files
committed
Fix set None to ovn_lb in hm_sync
We try to fetch newest ovn_lb in hm_sync process, but `_find_ovn_lb_from_hm_id` could give None as return ovn_lb value. In that case, we better use existing ovn_lb that passing to hm_sync. Change-Id: Ic856c4db76fb10808372ad64861b56a508bdcf8a
1 parent 9bbc7d3 commit ae39923

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ovn_octavia_provider/helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3750,7 +3750,8 @@ def hm_sync(self, hm, ovn_lb, pool_key):
37503750
:param ovn_lb: The OVN LoadBalancer object that needs to be sync
37513751
:param pool_key: The pool_key where health monitor is associated
37523752
"""
3753-
lbhcs, ovn_lb = self._find_ovn_lb_from_hm_id(hm[constants.ID])
3753+
lbhcs, _ovn_lb = self._find_ovn_lb_from_hm_id(hm[constants.ID])
3754+
ovn_lb = _ovn_lb if _ovn_lb else ovn_lb
37543755
if not lbhcs:
37553756
LOG.debug("Loadbalancer health check %s not found!",
37563757
hm[constants.ID])

0 commit comments

Comments
 (0)