node update() takes exactly 4 arguments (3 given) when recovery with lb_policy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
senlin |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When attach load balancer policy for a cluster, when it recovery it has error
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.013 1 ERROR senlin.
2018-12-24 17:55:18.247 1 ERROR senlin.engine.event [req-c8c181a0-
Changed in senlin: | |
assignee: | nobody → Nguyễn Ngọc Thái (crownwin) |
Changed in senlin: | |
status: | New → Confirmed |
assignee: | Nguyễn Ngọc Thái (crownwin) → nobody |
assignee: | nobody → sapd (saphi070) |
Changed in senlin: | |
assignee: | crownwin (crownwin) → nobody |
Hi you, I also have this error. After following source code, I detected function "_process_recovery" in senlin/ senlin/ policies/ lb_policy. py having "no.Node. update( action. context, values)" miss a argument: node.id. Because it call update(cls, context, obj_id, values).
I tried to edit no.Node. update( action. context, node.id, values) and succeeded.
def _process_ recovery( self, candidates, policy, driver, action): 'lb_member' , None) 'recovery' , None)
values[ 'data'] = data
no. Node.update( action. context, values)
# Process node recovery action
node = action.entity
data = node.data
lb_member = data.get(
recovery = data.pop(
values = {}
# lb_member is None, need to add to lb pool
if not lb_member:
return candidates
# was a member of lb pool, check whether has been recreated RECOVER_ RECREATE:
self. _remove_ member( action. context, candidates, policy, driver,
handle_ err=False)
data. pop('lb_ member' , None)
values[ 'data'] = data
no. Node.update( action. context, node.id, values)
if recovery is not None and recovery == consts.
return candidates
return None
def update(cls, context, obj_id, values): metadata( values)
db_api. node_update( context, obj_id, values)
values = cls._transpose_