Request log record error in LOG file

Bug #1746669 reported by liyi on 2018-02-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
In Progress
Undecided
liyi

Bug Description

When I call heat stack_show API with stackID, the log shows as follow:
2018-01-31 14:43:38.707 16383 DEBUG heatclient.common.http [req-93c59a14-b87e-4237-aeba-0c861d302a97 - - - - -] curl -g -i -X GET -H 'X-Auth-Token: {SHA1}545243502dad0e45bf73a1af2e081b1d4d2c3509' -H 'Content-Type: application/json' -H 'X-Auth-Url: https://10.127.3.201:5000/v3' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' --cacert /etc/magnum/ssl/ca.crt https://10.127.3.201:8004/v1/f228f25706744b879eebf0c5ab442139/stacks/8206d80a-f4fd-4cdf-a4d0-65d0ad0d4310 log_curl_request /usr/lib/python2.7/site-packages/heatclient/common/http.py:141
2018-01-31 14:43:39.193 16383 DEBUG heatclient.common.http [req-93c59a14-b87e-4237-aeba-0c861d302a97 - - - - -]
HTTP/1.1 302 Found
Location: https://10.127.3.201:8004/v1/f228f25706744b879eebf0c5ab442139/stacks/cr-cluster-kms7hdygvvdx/8206d80a-f4fd-4cdf-a4d0-65d0ad0d4310

That mean I get the right path of this stack. And then, heatclient will redirect to this location. But the log_curl_request print wrong log as:

log_http_response /usr/lib/python2.7/site-packages/heatclient/common/http.py:154
2018-01-31 14:43:39.194 16383 DEBUG heatclient.common.http [req-93c59a14-b87e-4237-aeba-0c861d302a97 - - - - -] curl -g -i -X GET -H 'User-Agent: python-heatclient' -H 'Content-Type: application/json' -H 'X-Auth-Url: https://10.127.3.201:5000/v3' -H 'Accept: application/json' -H 'X-Auth-Token: {SHA1}545243502dad0e45bf73a1af2e081b1d4d2c3509' --cacert /etc/magnum/ssl/ca.crt https://10.127.3.201:8004/v1/f228f25706744b879eebf0c5ab442139https://10.127.3.201:8004/v1/f228f25706744b879eebf0c5ab442139/stacks/cr-cluster-kms7hdygvvdx/8206d80a-f4fd-4cdf-a4d0-65d0ad0d4310 log_curl_request /usr/lib/python2.7/site-packages/heatclient/common/http.py:141

We will see that the URL contain duplicated endpoint prefix.

liyi (whyliyi) on 2018-02-01
Changed in python-heatclient:
assignee: nobody → liyi (whyliyi)

Fix proposed to branch: master
Review: https://review.openstack.org/539834

Changed in python-heatclient:
status: New → In Progress

This issue was fixed in the openstack/python-heatclient 1.16.1 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers