Action error message should print the root cause in the beginning

Bug #1847984 reported by Renat Akhmerov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Renat Akhmerov

Bug Description

When an action fails it raises an exception containing a message like this:

u"The action raised an exception [action_ex_id=69df1efe-e078-4381-a4c1-44d37613b22f, action_cls='<class 'abc.WorkflowInputAction'>', attributes='{u'ACTION_AVAILABILITY': [u'disabled_if_scheduled']}', params='{u'operation_parameters': {u'extVirtualLinks': [{u'resourceId': u'configuration not needed', u'extCps': [{u'cpdId': u'configuration not needed', u'numDynamicAddresses': 0, u'addresses': []}], u'vimId': u'073c6eb0-26f0-4e86-b83f-26cd0d35c26e', u'extVirtualLinkId': u'ac4e5090-0be4-46f8-9a71-4aa807f1035d'}], u'grantlessMode': True, u'softwareImages': [], u'flavourId': u'bts_flavor', u'zones': [{u'resourceId': u'55dc8481-a169-4cd8-bb0a-dfd3963d0a57', u'id': u'd319f63d-c7d8-4af5-bc8f-759fbf349990', u'vimId': u'073c6eb0-26f0-4e86-b83f-26cd0d35c26e'}], u'vims': [{u'interfaceInfo': {u'endpoint': u'https://10.75.239.100:13000/v3'}, u'vimInfoType': u'OPENSTACK_V3_INFO', u'accessInfo': {u'username': u'admin', u'userDomain': u'default', u'region': u'regionOne', u'project': u'admin', u'projectDomain': u'default', u'password': u'2fI_p2FO3onNtEiB'}, u'id': u'073c6eb0-26f0-4e86-b83f-26cd0d35c26e'}], u'instantiationLevelId': u'base1',

.... <many more lines>

The issue with this format is that it doesn't include the root cause in the beginning. So if a client decides to truncate this long message the root cause may not be included at all. Since it's more important info than, e.g. action class attributes, it should go before them.

Changed in mistral:
milestone: none → ussuri-1
assignee: nobody → Renat Akhmerov (rakhmerov)
importance: Undecided → High
status: New → In Progress
tags: added: backport train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/688378

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/train)

Reviewed: https://review.opendev.org/688378
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=5d387db6c2a53e3c28d46ffd7da45cf1f52a3d8b
Submitter: Zuul
Branch: stable/train

commit 5d387db6c2a53e3c28d46ffd7da45cf1f52a3d8b
Author: Renat Akhmerov <email address hidden>
Date: Fri Oct 11 19:03:07 2019 +0700

    Change the action error message format

    * Some users rely on the presence of the root error related to
      running an action and it's not convenient that it is now in
      the end of the string, e.g. if we look at the corresponding
      task execution "state_info" field. This patch includes the cause
      error message in the beginning of the resulting error string
      returned by the action executor so that it's clearly visible.
      This message can be also truncated in some cases (depending on
      the config option) so we need to make sure we keep the cause
      error message.

    Closes-Bug: #1847984
    Change-Id: Ieb10c10401380410665c418f4688681e929b1e23

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.opendev.org/688112
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=8f02e8a7d7f3025aae7a99543568fe4eb451c955
Submitter: Zuul
Branch: master

commit 8f02e8a7d7f3025aae7a99543568fe4eb451c955
Author: Renat Akhmerov <email address hidden>
Date: Fri Oct 11 19:03:07 2019 +0700

    Change the action error message format

    * Some users rely on the presence of the root error related to
      running an action and it's not convenient that it is now in
      the end of the string, e.g. if we look at the corresponding
      task execution "state_info" field. This patch includes the cause
      error message in the beginning of the resulting error string
      returned by the action executor so that it's clearly visible.
      This message can be also truncated in some cases (depending on
      the config option) so we need to make sure we keep the cause
      error message.

    Closes-Bug: #1847984
    Change-Id: Ieb10c10401380410665c418f4688681e929b1e23

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

This issue was fixed in the openstack/mistral 9.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 10.0.0.0b1

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