openstackdevstack

OpenStack Mistral workflow error while executing using GUI


I am getting error while executing OpenStack simple mistral workflow on OpenStack(wallaby) devstack environment. While I can execute the workflow from CLI command and got success But it fails if I try the same thing with GUI

root@openstack:~# openstack workflow definition show test_get
---
version: '2.0'

test_get:
  description: Test Get.
  tasks:
    my_task:
      action: std.http
      input:
        url: http://www.google.com

root@openstack:~# openstack workflow execution create test_get
+--------------------+--------------------------------------+
| Field              | Value                                |
+--------------------+--------------------------------------+
| ID                 | 482e3803-45ef-411e-a0f4-1427abfc8649 |
| Workflow ID        | 9dc0d4a4-8c5b-4288-8126-e1147da3bd02 |
| Workflow name      | test_get                             |
| Workflow namespace |                                      |
| Description        |                                      |
| Task Execution ID  | <none>                               |
| Root Execution ID  | <none>                               |
| State              | RUNNING                              |
| State info         | None                                 |
| Created at         | 2021-06-21 16:58:54                  |
| Updated at         | 2021-06-21 16:58:54                  |
| Duration           | ...                                  |
+--------------------+--------------------------------------+

But while executing in GUI I get **

Execution is missing field "workflow_identifier"

**

enter image description here


Solution

  • Faced the same issue in Yoga release. Spent a few hours to investigate it and found interesting thing: /usr/local/lib/python3.8/dist-packages/mistralclient/api/v2/executions.py

    class ExecutionManager(base.ResourceManager):
    resource_class = Execution
    
    def create(self, wf_identifier='', namespace='',
               workflow_input=None, description='', source_execution_id=None,
               **params):
        self._ensure_not_empty(
            workflow_identifier=wf_identifier or source_execution_id
        )
    

    But! in the webform we are using workflow_identifier instead of wf_identifier /usr/local/lib/python3.8/dist-packages/mistraldashboard/workflows/forms.py

        def handle(self, request, data):
        try:
            data['workflow_identifier'] = data.pop('workflow_name')
            data['workflow_input'] = {}
            for param in self.workflow_parameters:
                value = data.pop(param)
                if value == "":
                    value = None
                data['workflow_input'][param] = value
            ex = api.execution_create(request, **data)
    

    FIX is to rename workflow_identifier to wf_identifier in the form like

    data['wf_identifier'] = data.pop('workflow_name')
    

    After that mistral-dashboard works fine with execution creating.