Node introspection fails when max_retry_count set to 0

Bug #1753784 reported by Jiri Tomasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Dougal Matthews

Bug Description

When I set max_retry_attempts to 0 in nodes introspection workflow and the introspection fails (in this case when trying to run it on node in 'available' state), the introspection workflow fails with:

State | ERROR |
| State info | Failed to handle action completion [error=Can not evaluate YAQL expression [expression='Retry limit reached with {0} nodes still failing introspection'.format($.failed_introspection.len()), error=u'failed_introspection', data={}], wf=tripleo.baremetal.v1.introspect, task=max_retry_attempts_reached, action=std.noop]: |
| | Traceback (most recent call last): |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/task_handler.py", line 110, in _on_action_complete |
| | task.on_action_complete(action_ex) |
| | File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 157, in wrapper |
| | result = f(*args, **kwargs) |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/tasks.py", line 325, in on_action_complete |
| | self.complete(state, state_info) |
| | File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 157, in wrapper |
| | result = f(*args, **kwargs) |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/tasks.py", line 191, in complete |
| | data_flow.publish_variables(self.task_ex, self.task_spec) |
| | File "/usr/lib/python2.7/site-packages/mistral/workflow/data_flow.py", line 210, in publish_variables |
| | task_ex.published = expr.evaluate_recursively(branch_vars, expr_ctx) |
| | File "/usr/lib/python2.7/site-packages/mistral/expressions/__init__.py", line 100, in evaluate_recursively |
| | data[key] = _evaluate_item(data[key], context) |
| | File "/usr/lib/python2.7/site-packages/mistral/expressions/__init__.py", line 79, in _evaluate_item |
| | return evaluate(item, context) |
| | File "/usr/lib/python2.7/site-packages/mistral/expressions/__init__.py", line 71, in evaluate |
| | return evaluator.evaluate(expression, context) |
| | File "/usr/lib/python2.7/site-packages/mistral/expressions/yaql_expression.py", line 119, in evaluate |
| | cls).evaluate(trim_expr, data_context) |
| | File "/usr/lib/python2.7/site-packages/mistral/expressions/yaql_expression.py", line 73, in evaluate |
| | ", data=%s]" % (expression, str(e), data_context) |
| | YaqlEvaluationException: Can not evaluate YAQL expression [expression='Retry limit reached with {0} nodes still failing introspection'.format($.failed_introspection.len()), error=u'failed_introspection', data={}]

Dougal Matthews (d0ugal)
tags: added: workflows
Changed in tripleo:
milestone: rocky-1 → rocky-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/567201

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-common (master)

Change abandoned by Dougal Matthews (<email address hidden>) on branch: master
Review: https://review.openstack.org/567201

Changed in tripleo:
assignee: nobody → Dougal Matthews (d0ugal)
status: Triaged → In Progress
Changed in tripleo:
milestone: rocky-2 → rocky-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/571169
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=ee2c7d8f71f758719132493a5ff4f1f042b3096f
Submitter: Zuul
Branch: master

commit ee2c7d8f71f758719132493a5ff4f1f042b3096f
Author: Dougal Matthews <email address hidden>
Date: Wed May 30 11:08:06 2018 +0100

    Set the initial introspection attempt to 0

    When it was set to 1, it meant that we done one less retry than
    expected. 0 retries meant 0 attempts (an an error). So now 0 retries
    should mean the initial attempt and no retries. We have been running one
    less introspection attempt than we previously claimed.

    Closes-Bug: #1753784
    Change-Id: I4e9485e6b11daf2a44cba114e97fdce582258f1e

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 9.2.0

This issue was fixed in the openstack/tripleo-common 9.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-common (master)

Change abandoned by Dougal Matthews (<email address hidden>) on branch: master
Review: https://review.openstack.org/567201

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.