Mistral group validations fails with YAQL exception

Bug #1781348 reported by Carlos Camacho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Carlos Camacho

Bug Description

Executing the tripleo-validations 'group-validations' they fail with (This change only affects latest master, but hould be backported):

How to reproduce:
(undercloud) [stack@undercloud tripleo-common]$ openstack workflow execution create -f value -c ID tripleo.validations.v1.run_groups '{"group_names": ["pre-upgrade"]}'
0388cbe6-2691-4d1e-a141-a9965780fff2
(undercloud) [stack@undercloud tripleo-common]$ mistral execution-get 0388cbe6-2691-4d1e-a141-a9965780fff2

Output:

+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ID | b1a75281-88e0-4938-b5c9-0babf9cfc046 |
| Workflow ID | d87c7e95-c4fc-431b-9d1b-cfde1b558a44 |
| Workflow name | tripleo.validations.v1.run_groups |
| Workflow namespace | |
| Description | |
| Task Execution ID | |
| State | ERROR |
| State info | Failed to run task [error=Can not evaluate YAQL expression [expression=$.validation_name, error=u'validation_name', data={}], wf=tripleo.validations.v1.run_groups, task=notify_running]: |
| | Traceback (most recent call last): |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/task_handler.py", line 63, in run_task |
| | task.run() |
| | File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 158, in wrapper |
| | result = f(*args, **kwargs) |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/tasks.py", line 390, in run |
| | self._run_new() |
| | File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 158, in wrapper |
| | result = f(*args, **kwargs) |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/tasks.py", line 419, in _run_new |
| | self._schedule_actions() |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/tasks.py", line 483, in _schedule_actions |
| | input_dict = self._get_action_input() |
| | File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 158, in wrapper |
| | result = f(*args, **kwargs) |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/tasks.py", line 514, in _get_action_input |
| | input_dict = self._evaluate_expression(self.task_spec.get_input(), ctx) |
| | File "/usr/lib/python2.7/site-packages/mistral/engine/tasks.py", line 540, in _evaluate_expression |
| | ctx_view |
| | 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 89, in _evaluate_item |
| | return evaluate_recursively(item, context) |
| | 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 159, in evaluate |
| | cls).evaluate(trim_expr, data_context) |
| | File "/usr/lib/python2.7/site-packages/mistral/expressions/yaql_expression.py", line 113, in evaluate |
| | ", data=%s]" % (expression, str(e), data_context) |
| | YaqlEvaluationException: Can not evaluate YAQL expression [expression=$.validation_name, error=u'validation_name', data={}] |
| | |
| Created at | 2018-07-09 14:56:08 |
| Updated at | 2018-07-09 14:56:09 |
+--------------------+---------------

Basically, there are variables not defined and referenced breaking the execution of the workflow.

Revision history for this message
Carlos Camacho (ccamacho) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

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

commit fff8a7349dca2bc66b7f5c0c318c6f1b16ca8976
Author: Carlos Camacho <email address hidden>
Date: Mon Jul 9 14:55:55 2018 +0000

    tripleo-validations, group-validations fails with notify_running task exception

    Currently when executing a group-validation like the pre-upgrade
    validations, the Mistral workflow fails with:

    Can not evaluate YAQL expression [expression=$.validation_name, error=u'validation_name', data={}]

    This is due to referencing variables not defined.

    Change-Id: Ifda4708eb2e0054cdee35edc61bbfcaab5ec2109
    Closes-Bug: 1781348
    Story: #2002915

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.

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.