Cluster recovery does not handle operation specified in body

Bug #1815540 reported by Duc Truong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
Unassigned

Bug Description

Call cluster recovery with the following body
{
operation: rebuild
check: true
check_capacity: true
}

Node recovery fails with the following stack trace:

2019-01-25 00:44:38.478 ERROR senlin.engine.actions.base [req-947ea9ba-19b8-4066-90aa-5d9e6f897202 None None] Unexpected exception occurred during action NODE_RECOVER (47281310-94c9-4a3b-bbbf-bad612864eeb) execution: 'unicode' object has no attribute 'get': AttributeError: 'unicode' object has no attribute 'get'
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base Traceback (most recent call last):
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base File "/opt/stack/senlin/senlin/engine/actions/base.py", line 678, in ActionProc
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base result, reason = action.execute()
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base File "/opt/stack/senlin/senlin/engine/actions/node_action.py", line 277, in execute
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base res, reason = self._execute()
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base File "/opt/stack/senlin/senlin/engine/actions/node_action.py", line 240, in _execute
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base return method()
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 159, in wrapper
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base result = f(*args, **kwargs)
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base File "/opt/stack/senlin/senlin/engine/actions/node_action.py", line 209, in do_recover
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base res = self.entity.do_recover(self.context, self)
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base File "/opt/stack/senlin/senlin/engine/node.py", line 373, in do_recover
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base if op.get('name') == consts.RECOVER_REBOOT]
2019-01-25 00:44:38.478 TRACE senlin.engine.actions.base AttributeError: 'unicode' object has no attribute 'get'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/636811
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=67591b0211830be41ea741a9d27b7f653beb4e74
Submitter: Zuul
Branch: master

commit 67591b0211830be41ea741a9d27b7f653beb4e74
Author: Duc Truong <email address hidden>
Date: Wed Feb 13 19:07:07 2019 +0000

    Fix cluster recovery and node recovery params

    - Make 'operation' param in cluster recovery and node recovery a
      string.
    - Add 'operation_params' for cluster recovery and node recovery to pass
      in extra parameters like reboot type.
    - Add type validation checks for cluster recovery and node recovery
      parameters.

    Change-Id: I73600991f97d5700d3eac442b4785f653ba4820f
    Closes-Bug: #1815540

Changed in senlin:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 7.0.0.0b1

This issue was fixed in the openstack/senlin 7.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.