x-openstack-request-id changed at redirected request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keystoneauth |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
For now, issue affects only Heat requests. Patch to Keystoneauth can fix the issue system-wide and with the minimal efforts.
Heat uses 302 response for most of common requests, like stack create, delete, etc. At first, it returns id of requested entity, and then redirects to URL which points to this entity. Heatclient uses keystoneauth to handle this redirect, and it works correctly, except logging. Heat API logs two requests with different req-id, but Heat engine logs only second req-id. It is very confusing and makes logs investigation more difficult
Affected version: any recent Openstack setup with enabled Heat
Steps to reproduce:
1. Create Heat stack using any valid template
Actual behavior:
Heat API log:
2022-09-19 05:31:46.476 13 DEBUG heat.api.
2022-09-19 05:31:46.477 13 DEBUG heat.api.
Heat engine log:
2022-09-19 05:31:46.504 1 INFO heat.engine.service [req-829ea58a-
022-09-19 05:31:46.562 1 DEBUG heat.engine.stack [req-829ea58a-
2022-09-19 05:31:46.683 1 INFO heat.engine.worker [req-829ea58a-
We see different req-id in every log, despite they are processing the same request.
Changed in keystoneauth: | |
status: | New → In Progress |
Reviewed: https:/ /review. opendev. org/c/openstack /keystoneauth/ +/864309 /opendev. org/openstack/ keystoneauth/ commit/ c800dcee75144e9 6aef23abaaa3a78 078e7f0992
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit c800dcee75144e9 6aef23abaaa3a78 078e7f0992
Author: Vadym Markov <email address hidden>
Date: Mon Nov 7 19:55:01 2022 +0200
Keep request-id at redirect
Currently when redirects are used, the request id can get lost on redirect.
Proposed patch reuses req-id from redirect response and passes it to
actual request
Closes-Bug: #2000742 67677cdd19f3c7b 39abe6044ef
Change-Id: I98d5d4490b3d56