Zun

Add 'message' to ContainerActionEvent

Bug #1766118 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Triaged
Medium
Unassigned

Bug Description

Zun has introduced a new API for container actions and events (https://blueprints.launchpad.net/zun/+spec/container-actions-api). The implementation is provided by the following patch:

* https://review.openstack.org/#/c/524451/ (DB model)
* https://review.openstack.org/#/c/525085/ (DB API and objects)
* https://review.openstack.org/#/c/536260/ (Compute)
* https://review.openstack.org/#/c/548853/ (API layer)
* CLI is pending (https://bugs.launchpad.net/zun/+bug/1753887)

Here is the sample response of this API (https://review.openstack.org/#/c/548853/4/api-ref/source/samples/container-action-get-resp.json):

    {
        "action": "create",
        "events": [
            {
              "event": "container__do_container_start",
              "finish_time": "2018-03-04 17:03:07+00:00",
              "result": "Success",
              "start_time": "2018-03-04 17:02:57+00:00",
              "traceback": null
            }
        ],
        ...
    }

If an exception occurred, the 'result' will be set to 'Error' and the 'traceback' will show the exception's trace. However, we don't have a field to record the exception's message. As a result, this information is lost.

We'd better to improve the container action API to record the exception's message of each event. For example, the response could be as below or something similar:

    {
        "action": "create",
        "events": [
            {
              "event": "container__do_container_start",
              "finish_time": "2018-03-04 17:03:07+00:00",
              "result": "Error",
              "start_time": "2018-03-04 17:02:57+00:00",
              "message": "...",
              "traceback": "...."
            }
        ],
        ...
    }

hongbin (hongbin034)
Changed in zun:
status: New → Triaged
importance: Undecided → Medium
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.