500 error code when running single action-execution with error

Bug #1498803 reported by Nikolay Makhotkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Nikolay Makhotkin

Bug Description

Steps to reproduce:

1. Use CLI to create action-execution:
  mistral run-action nova.servers_create '{"name": "nm-mistral", "flavor": "2", "image": "82065b4d-2c79-420d-adc3-310de275e922", "nics": [{"net-id": "wrong"}]}'

2. Get traceback

Traceback (most recent call last):

  File "/home/kolyan/projects/mistral/.tox/venv/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
    executor_callback))

  File "/home/kolyan/projects/mistral/.tox/venv/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
    executor_callback)

  File "/home/kolyan/projects/mistral/.tox/venv/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
    result = func(ctxt, **new_args)

  File "/home/kolyan/projects/mistral/mistral/engine/rpc.py", line 122, in start_action
    **params

  File "/home/kolyan/projects/mistral/mistral/utils/__init__.py", line 107, in _logged
    return func(*args, **kw)

  File "/home/kolyan/projects/mistral/mistral/engine/default_engine.py", line 131, in start_action
    async=False

  File "/home/kolyan/projects/mistral/mistral/engine/action_handler.py", line 154, in run_action
    return _get_action_output(action_result)

  File "/home/kolyan/projects/mistral/mistral/engine/action_handler.py", line 167, in _get_action_output
    if result.is_success() else {'result': result.error})

AttributeError: 'unicode' object has no attribute 'is_success'

Need to fix on server-side.

summary: - 500 error code while run single action-execution with error
+ 500 error code when running single action-execution with error
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/226742

Changed in mistral:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/226742
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=117dc15cf59a88d8ab6b193754e884a7a8218707
Submitter: Jenkins
Branch: master

commit 117dc15cf59a88d8ab6b193754e884a7a8218707
Author: Nikolay Mahotkin <email address hidden>
Date: Wed Sep 23 15:08:03 2015 +0300

    Fixing run action when error occurs

    Closes-Bug: #1498803

    Change-Id: I2e47ce5ce80c0d8918f4dc0d060935f321ccd9b9

Changed in mistral:
status: In Progress → Fix Committed
Changed in mistral:
status: Fix Committed → Fix Released
Changed in mistral:
milestone: liberty-rc1 → liberty
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.