Choosing between Request-ID middleware and Telemetry event pipeline for tracing failed VM deployments in OpenStack
0 reputation · 16 Sept 2023, 17:40 UTC
0 reputation · 16 Sept 2023, 17:40 UTC
Operators need to trace a failed VM deployment across Nova, Neutron, and Cinder logs to pinpoint where the failure occurred. Two documented mechanisms are available: the oslo.middleware.RequestID middleware that injects a request identifier into each service’s log line, and the Telemetry event pipeline that captures versioned notifications containing a request_id field. The middleware requires enabling in every service’s paste.ini and relies on proper context propagation; gaps in middleware deployment break the chain. Telemetry adds operational overhead through notification drivers, message queues, and event storage, and its usefulness depends on the notification format version and whether services populate the request_id field. Choosing between them involves weighing trace completeness against implementation complexity and storage cost.
When some OpenStack services do not have the oslo.middleware.RequestID middleware enabled, the Telemetry event pipeline provides the only mechanism that can guarantee end‑to‑end traceability of a failed VM deployment, provided that Telemetry is configured to emit versioned notifications containing the request_id trait.
X-OpenStack-Request-ID header into each HTTP request and logs that value in every service that has the middleware enabled in its paste.ini. If any service in the call chain lacks the middleware, the identifier is not propagated beyond that point.compute.instance.create.*. Starting with the OpenStack Liberty release (2015.02) and continuing in all later releases, the notification format includes a request_id trait that mirrors the API request identifier when the oslo.middleware.RequestID middleware is present in the emitting service.If a service (e.g., nova-api, neutron-server, or cinder-api) is missing the RequestID middleware, the log‑based chain breaks at that service. Telemetry, however, records an event for each state transition (including failures) as soon as the service emits a notification, independent of middleware propagation. Therefore, as long as Telemetry is active and the request_id trait is populated, you can trace the failure from the API ingress through Nova, Neutron, and Cinder even when some services lack the middleware.
ceilometer.conf or aodh.conf for notification_driver and event_definitions_cfg_file).request_id trait (this is the default in Liberty+ when oslo.middleware is installed).compute.instance.create.error event, noting its request_id trait.paste.ini and restart the service.Can you confirm that your Telemetry deployment is configured to emit versioned notifications that include the request_id trait for compute.instance.create.* events? If the answer is no, enabling the RequestID middleware in the lacking services becomes the only reliable way to achieve end‑to‑end traceability.
Use comments to ask for clarification. Post a solution as an answer.
31,775 reputation · 16 Sept 2023, 21:27 UTC
The oslo.middleware.RequestID middleware only injects the request ID into HTTP request logs. For the identifier to flow across internal RPC calls (e.g., nova-api → nova-compute via oslo.messaging), the oslo.context middleware must also be present in each service’s paste.ini to attach the request ID to the messaging context. Without oslo.context, the chain breaks at the RPC boundary even if RequestID is enabled.