log_curl_request logs requests incorrectly

Bug #1395740 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
Undecided
Vladyslav Drok

Bug Description

In nova compute log you can see the following:

DEBUG ironicclient.common.http [-] curl -i -X GET -H 'X-Auth-Token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-ironicclient' http://192.168.122.222:6385/v1/v1/nodes/detail from (pid=23015) log_curl_request /opt/stack/python-ironicclient/ironicclient/common/http.py:106

This request target is incorrect - http://192.168.122.222:6385/v1/v1/nodes/detail and it happens because of log_curl_request not removing trailing API version from endpoint, while get_connection_params does and that's why actual requests are handled correctly.

Vladyslav Drok (vdrok)
Changed in python-ironicclient:
assignee: nobody → Vladyslav Drok (vdrok)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

Changed in python-ironicclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/136773
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=f467415ba989b238c00dc7b7f7160fd4930f37d3
Submitter: Jenkins
Branch: master

commit f467415ba989b238c00dc7b7f7160fd4930f37d3
Author: Vladyslav Drok <email address hidden>
Date: Mon Nov 24 16:27:06 2014 +0200

    Fix log_curl_request API version duplication

    log_curl_request duplicates API version when logging request (e.g.
    http://192.168.122.222:6385/v1/v1/nodes/detail). Trailing API version
    should be removed from the ironic endpoint when constructing logged
    string.

    Closes-bug: #1395740
    Change-Id: Ia3fc29ed0ccaf2fbe9fea041098dcf079d711e8f

Changed in python-ironicclient:
status: In Progress → Fix Committed
Changed in python-ironicclient:
milestone: none → 0.7.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.