Add request_id to the InstanceAction versioned notifications

Registered by Balazs Gibizer

As it was agreed on the Rocky PTG [1] it is useful to have the request_id of in the payload of every instance action versioned notification. For example it could help the deployer connect the state change described in the notification with the user action, the request, on the REST API.

So this bp proposes to extend the InstanceActionPayload versioned object [2] with a new request_id field and populate the request_id from the context object used for emitting the instance action notifications.

[1] https://etherpad.openstack.org/p/nova-ptg-rocky L391
[2]https://github.com/openstack/nova/blob/5d2add74534719c5670b29152964a60e8f23b42b/nova/notifications/objects/instance.py#L125

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
Low
Drafter:
Balazs Gibizer
Direction:
Approved
Assignee:
Zhenyu Zheng
Definition:
Approved
Series goal:
Accepted for rocky
Implementation:
Implemented
Milestone target:
milestone icon rocky-2
Started by
Matt Riedemann
Completed by
Matt Riedemann

Related branches

Sprints

Whiteboard

As noted, this was discussed at the Rocky PTG and had agreement there to do this. -- mriedem 20180305

What about fault and traceback? It also came up in the discussion? - Kevin

The fault and traceback in the versioned error notification can probably just be fixed as a bug since I believe it's a regression in behavior with how the legacy error notifications worked, which just serialized the payload and the exception object was in the payload. I think gibi said he might have had a good reason why the versioned error notification didn't include the traceback, and he was going to investigate it after the PTG. -- mriedem

I will do the investigation and report a bug if needed. -- gibi

Gerrit topic: https://review.openstack.org/#q,topic:bp/add-request-id-to-instance-action-notifications,n,z

Addressed by: https://review.openstack.org/551982
    Add request_id filed to InstanceAction versioned notifications

Addressed by: https://review.openstack.org/553288
    WIP

Addressed by: https://review.openstack.org/562757
    Leave a hint when populate_schema fails

Addressed by: https://review.openstack.org/562793
    Move some tests into nova.tests.unit.notifications.objects.test_instance

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.