Skip to content

Commit

Permalink
Merge pull request #1632 from zongzw/revert-alg
Browse files Browse the repository at this point in the history
Revert "change the algorithm from least-connection-node to least-conn…
  • Loading branch information
zongzw authored Jan 26, 2021
2 parents 05e994b + bbb0133 commit 55887f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def _get_lb_method(self, method):
elif lb_method == 'RATIO_LEAST_CONNECTIONS':
return 'ratio-least-connections-member'
elif lb_method == 'SOURCE_IP':
return 'least-connections-member'
return 'least-connections-node'
elif lb_method == 'OBSERVED_MEMBER':
return 'observed-member'
elif lb_method == 'PREDICTIVE_MEMBER':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def test_pool_member_weight_source_ip(self, pool_member_service):
srvc = copy.deepcopy(pool_member_service)
srvc['pool']['lb_algorithm'] = 'SOURCE_IP'
pool = adapter.get_pool(srvc)
assert pool['loadBalancingMode'] == 'least-connections-member'
assert pool['loadBalancingMode'] == 'least-connections-node'

def test_pool_member_weight_bad_lb_method(self, pool_member_service):
'''If lb method is bad and member has weight, lb is changed
Expand Down Expand Up @@ -713,7 +713,7 @@ def test_pool_no_members_source_ip(self, pool_member_service):
del srvc['members']
srvc['pool']['lb_algorithm'] = 'SOURCE_IP'
pool = adapter.get_pool(srvc)
assert pool['loadBalancingMode'] == 'least-connections-member'
assert pool['loadBalancingMode'] == 'least-connections-node'

def test_get_pool_monitor_no_monitor(self, basic_service):
adapter = ServiceModelAdapter(mock.MagicMock())
Expand Down

0 comments on commit 55887f4

Please sign in to comment.