"task-defaults" does not work for reverse workflow

Bug #1401391 reported by Renat Akhmerov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
Renat Akhmerov

Bug Description

"task-defaults" does not work for reverse workflow even though policies can be applied for any task regardless of workflow type.

Changed in mistral:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Renat Akhmerov (rakhmerov)
milestone: none → kilo-1
Revision history for this message
Anastasia Kuznetsova (akuznetsova) wrote :

User gets following error:
[-] Exception during message handling: 'NoneType' object has no attribute 'get_wait_before'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply incoming.message))
File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch return self._do_dispatch(endpoint, method, ctxt, args)
File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch result = getattr(endpoint, method)(ctxt, **new_args)
File "/home/ubuntu/mistral/mistral/engine1/rpc.py", line 81, in start_workflow **params
File "/home/ubuntu/mistral/mistral/utils/__init__.py", line 94, in _logged return func(*args, **kw)
File "/home/ubuntu/mistral/mistral/engine1/default_engine.py", line 72, in start_workflow
self._run_local_commands(cmds, exec_db, wf_handler)
File "/home/ubuntu/mistral/mistral/engine1/default_engine.py", line 150, in _run_local_commands
 if not cmd.run_local(exec_db, wf_handler, cause_task_db):
File "/home/ubuntu/mistral/mistral/engine1/commands.py", line 102, in run_local self._before_task_start(wf_handler.wf_spec)
File "/home/ubuntu/mistral/mistral/engine1/commands.py", line 124, in _before_task_start wf_spec):
File "/home/ubuntu/mistral/mistral/engine1/policies.py", line 48, in build_policies
return construct_policies_list(policies_spec, wf_policies)
File "/home/ubuntu/mistral/mistral/engine1/policies.py", line 64, in construct_policies_list policy = factory(policies_spec)
File "/home/ubuntu/mistral/mistral/engine1/policies.py", line 76, in build_wait_before_policy
wait_before = policies_spec.get_wait_before()
 AttributeError: 'NoneType' object has no attribute 'get_wait_before'

Changed in mistral:
status: Confirmed → In Progress
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/140970

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/140967
Committed: https://git.openstack.org/cgit/stackforge/mistral/commit/?id=34793ef08508a968d632c9969d3f03576545c289
Submitter: Jenkins
Branch: master

commit 34793ef08508a968d632c9969d3f03576545c289
Author: Renat Akhmerov <email address hidden>
Date: Thu Dec 11 13:31:29 2014 +0600

    Testing retry policy defined in "task-defaults" for reverse workflow

    * Added a unit test
    * Minor refactoring in retry policy

    Closes-Bug: #1401391

    Change-Id: Id92302c196539e80522768e956dc1ebd7de18456

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/140970
Committed: https://git.openstack.org/cgit/stackforge/mistral/commit/?id=5aa2930c5a16c0a10d721cc54039962f3f220c05
Submitter: Jenkins
Branch: master

commit 5aa2930c5a16c0a10d721cc54039962f3f220c05
Author: Renat Akhmerov <email address hidden>
Date: Thu Dec 11 13:58:19 2014 +0600

    Testing timeout policy defined in "task-defaults" for reverse workflow

    * Added a unit test
    * Added asynchronous version of no-op action (async_noop)

    Change-Id: Ia535d80fa7702f907f8df6e522d665c0bf0f263d
    Closes-Bug: #1401391

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/140974
Committed: https://git.openstack.org/cgit/stackforge/mistral/commit/?id=63532f474eb3307cb71391a338094d1856366a8d
Submitter: Jenkins
Branch: master

commit 63532f474eb3307cb71391a338094d1856366a8d
Author: Renat Akhmerov <email address hidden>
Date: Thu Dec 11 14:22:27 2014 +0600

    Testing wait policies defined in "task-defaults" for reverse worklfow

    * Added a unit test

    Change-Id: I5b89d9f1105e69b9af910820d9d0d254b942d5ab
    Closes-Bug: #1401391

Changed in mistral:
status: Fix Committed → Fix Released
Changed in mistral:
milestone: kilo-1 → 2015.1
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.