diff --git a/senlin/policies/lb_policy.py b/senlin/policies/lb_policy.py index ccb1453d3..5fab04dda 100755 --- a/senlin/policies/lb_policy.py +++ b/senlin/policies/lb_policy.py @@ -571,7 +571,7 @@ class LoadBalancingPolicy(base.Policy): # lb_member is None, need to add to lb pool if not lb_member: values['data'] = data - no.Node.update(action.context, values) + no.Node.update(action.context, node.id, values) return candidates # was a member of lb pool, check whether has been recreated @@ -580,7 +580,7 @@ class LoadBalancingPolicy(base.Policy): handle_err=False) data.pop('lb_member', None) values['data'] = data - no.Node.update(action.context, values) + no.Node.update(action.context, node.id, values) return candidates return None diff --git a/senlin/tests/unit/policies/test_lb_policy.py b/senlin/tests/unit/policies/test_lb_policy.py index 9aa724f4c..d57d0b750 100644 --- a/senlin/tests/unit/policies/test_lb_policy.py +++ b/senlin/tests/unit/policies/test_lb_policy.py @@ -1133,7 +1133,7 @@ class TestLoadBalancingPolicyOperations(base.SenlinTestCase): res = policy._process_recovery(['NODE'], cp, self.lb_driver, action) self.assertEqual(['NODE'], res) - m_update.assert_called_once_with(action.context, {'data': {}}) + m_update.assert_called_once_with(action.context, 'NODE', {'data': {}}) @mock.patch.object(no.Node, 'update') @mock.patch.object(lb_policy.LoadBalancingPolicy, '_remove_member') @@ -1172,4 +1172,4 @@ class TestLoadBalancingPolicyOperations(base.SenlinTestCase): self.assertEqual(['NODE'], res) m_remove.assert_called_once_with(action.context, ['NODE'], cp, self.lb_driver, handle_err=False) - m_update.assert_called_once_with(action.context, {'data': {}}) + m_update.assert_called_once_with(action.context, 'NODE', {'data': {}})