Add full traceback to ExceptionPayload in versioned notifications

This patch adds full traceback to ExceptionPayload in versioned
notifications.

The instance fault field and instance-action REST API has already
provide the traceback to the admin users (controlable through policy)
and the notifications are also admin only things as they are emitted
to the message bus by default. So it is assumed that security is not
a bigger concern for the notification than for the REST API.

On the ML [1] post there was no objection to add new string field to the
ExceptionPayload that will hold the serialized traceback object.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128105.html

Implements: blueprint add-full-traceback-to-error-notifications

Change-Id: Id587967ea4f9980c292492e2f659bf55fb037b28
This commit is contained in:
Kevin_Zheng
2018-04-25 11:17:14 +08:00
parent 8863b501b7
commit 2a0f2a0d27
20 changed files with 188 additions and 77 deletions
@@ -9,11 +9,12 @@
"exception": "InterfaceAttachFailed",
"exception_message": "dummy",
"function_name": "_unsuccessful_attach_interface",
"module_name": "nova.tests.functional.notification_sample_tests.test_instance"
"module_name": "nova.tests.functional.notification_sample_tests.test_instance",
"traceback": "Traceback (most recent call last):\n File \"nova/compute/manager.py\", line ..."
},
"nova_object.name": "ExceptionPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.0"
"nova_object.version": "1.1"
}
}
},