Update pool erases member config
When a LBaaSv1 pool is being updated, the update erases the pool config. Change-Id: Ib0fab216c5affa0c3075689c8e7dd8b1c9e18598 Fixes-Bug: #1527178
This commit is contained in:
parent
852da6f12d
commit
588f84bf7b
@ -62,6 +62,7 @@ def convert_lbaas_app_profile(name, sess_persist, protocol):
|
|||||||
if protocol == lb_const.LB_PROTOCOL_HTTPS:
|
if protocol == lb_const.LB_PROTOCOL_HTTPS:
|
||||||
vcns_app_profile['sslPassthrough'] = True
|
vcns_app_profile['sslPassthrough'] = True
|
||||||
|
|
||||||
|
if sess_persist:
|
||||||
persist_type = sess_persist.get('type')
|
persist_type = sess_persist.get('type')
|
||||||
if persist_type:
|
if persist_type:
|
||||||
# If protocol is not HTTP, only source_ip is supported
|
# If protocol is not HTTP, only source_ip is supported
|
||||||
@ -206,9 +207,12 @@ class EdgeLbDriver(object):
|
|||||||
try:
|
try:
|
||||||
with locking.LockManager.get_lock(pool_mapping['edge_id'],
|
with locking.LockManager.get_lock(pool_mapping['edge_id'],
|
||||||
external=True):
|
external=True):
|
||||||
|
curr_pool = self.vcns.get_pool(pool_mapping['edge_id'],
|
||||||
|
pool_mapping['edge_pool_id'])[1]
|
||||||
|
curr_pool.update(edge_pool)
|
||||||
self.vcns.update_pool(pool_mapping['edge_id'],
|
self.vcns.update_pool(pool_mapping['edge_id'],
|
||||||
pool_mapping['edge_pool_id'],
|
pool_mapping['edge_pool_id'],
|
||||||
edge_pool)
|
curr_pool)
|
||||||
self.lbv1_driver.pool_successful(context, pool)
|
self.lbv1_driver.pool_successful(context, pool)
|
||||||
|
|
||||||
except nsxv_exc.VcnsApiException:
|
except nsxv_exc.VcnsApiException:
|
||||||
|
@ -188,8 +188,10 @@ class TestEdgeLbDriver(base.BaseTestCase):
|
|||||||
|
|
||||||
pool_mapping = {'edge_id': EDGE_ID, 'edge_pool_id': EDGE_POOL_ID}
|
pool_mapping = {'edge_id': EDGE_ID, 'edge_pool_id': EDGE_POOL_ID}
|
||||||
with self._mock_edge_lbv1_driver('pool_successful') as pool_successful,\
|
with self._mock_edge_lbv1_driver('pool_successful') as pool_successful,\
|
||||||
|
self._mock_edge_driver_vcns('get_pool') as get_pool, \
|
||||||
self._mock_edge_driver_vcns('update_pool') as update_pool:
|
self._mock_edge_driver_vcns('update_pool') as update_pool:
|
||||||
|
|
||||||
|
get_pool.return_value = (None, {})
|
||||||
self.edge_driver.update_pool(
|
self.edge_driver.update_pool(
|
||||||
self.context, from_pool, to_pool, pool_mapping)
|
self.context, from_pool, to_pool, pool_mapping)
|
||||||
update_pool.assert_called_with(EDGE_ID, EDGE_POOL_ID, edge_pool)
|
update_pool.assert_called_with(EDGE_ID, EDGE_POOL_ID, edge_pool)
|
||||||
|
Loading…
Reference in New Issue
Block a user