Cannot create an ad-hoc action from another ad-hoc action

Bug #1591217 reported by Xavier Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Xavier Hardy

Bug Description

As an action creator, I must be able to create ad-hoc actions from other ad-hoc actions. Doing so result in a 500 Internal Server error message:

```
AttributeError: 'NoneType' object has no attribute 'rpartition'
Traceback (most recent call last):

  File "/home/user/env/local/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
    res = self.dispatcher.dispatch(message)

  File "/home/user/env/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 150, in dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)

  File "/home/user/env/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 121, in _do_dispatch
    result = func(ctxt, **new_args)

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/engine/rpc.py", line 141, in start_action
    **params

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/utils/__init__.py", line 113, in _logged
    return func(*args, **kw)

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/engine/default_engine.py", line 82, in start_action
    action.schedule(action_input, target)

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/engine/actions.py", line 209, in schedule
    desc=desc

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/engine/actions.py", line 134, in _create_action_execution
    self.action_def.attributes or {}) and self.task_ex:

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/services/action_manager.py", line 179, in has_action_context
    return _has_argument(action, attributes, _ACTION_CTX_PARAM)

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/services/action_manager.py", line 172, in _has_argument
    action_cls = action_factory.construct_action_class(action, attributes)

  File "/home/user/env/local/lib/python2.7/site-packages/mistral/actions/action_factory.py", line 20, in construct_action_class
    action_class = importutils.import_class(action_class_str)

  File "/home/user/env/local/lib/python2.7/site-packages/oslo_utils/importutils.py", line 29, in import_class
    mod_str, _sep, class_str = import_str.rpartition('.')

AttributeError: 'NoneType' object has no attribute 'rpartition'
```

Changed in mistral:
assignee: nobody → Michal Gershenzon (michal-gershenzon)
Changed in mistral:
assignee: Michal Gershenzon (michal-gershenzon) → Xavier Hardy (xavier-hardy)
Changed in mistral:
importance: Undecided → High
milestone: none → newton-2
Changed in mistral:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/334312
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=024d93801d7c26651a9c021323611be7a8dc6fa4
Submitter: Jenkins
Branch: master

commit 024d93801d7c26651a9c021323611be7a8dc6fa4
Author: Xavier Hardy <email address hidden>
Date: Mon Jun 27 10:25:41 2016 +0200

    Support recursive ad-hoc action definitions

    A ad-hoc action can be based on another ad-hoc actions,
    allowing several level of abstractions in actions.

    Change-Id: I321bbf798b2801041a83530152d0cd73d8bc7c01
    Closes-Bug: #1591217

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/mistral 3.0.0.0b2

This issue was fixed in the openstack/mistral 3.0.0.0b2 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.