Debug curl statement should include globoff for IPv6 URLs

Bug #1228744 reported by justinsb
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Sridhar Gaddam
oslo-incubator
Fix Released
Low
Sridhar Gaddam
python-heatclient
Fix Released
Low
Sridhar Gaddam
python-keystoneclient
Fix Released
Undecided
Sridhar Gaddam
python-novaclient
Fix Released
Low
Sridhar Gaddam

Bug Description

Curl needs "--globoff" when dealing with Ipv6 URLs.

The debug output should therefore include "--globoff"

echo ${OS_AUTH_URL}
http://[fd00::c10d]:8081/openstack/identity/v2.0

nova --debug list

REQ: curl -i http://[fd00::c10d]:8081/openstack/identity/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "default", "passwordCredentials": {"username": "admin", "password": "secret"}}}'

...

should be:

REQ: curl --globoff -i http://[fd00::c10d]:8081/openstack/identity/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "default", "passwordCredentials": {"username": "admin", "password": "secret"}}}'

I think the logic could be as simple as checking if the string starts with http://[ or https://[

Revision history for this message
Abhishek Chanda (abhishek-i) wrote :

This is a known bug in curl (#30 here) http://curl.haxx.se/docs/knownbugs.html
While we can fix novaclient, I think this should be fixed upstream and not us.

Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

This is an awkward kind of bug since it's just a debug statement. novaclient doesn't actually call curl. I guess it was originally done that way for debugging/troubleshooting purposes.

Since novaclient should never need to use globs, it could always print out a curl command line with the -g option.

melanie witt (melwitt)
Changed in python-novaclient:
importance: Undecided → Low
status: New → Triaged
Changed in python-novaclient:
assignee: nobody → Sridhar Gaddam (sridhargaddam)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

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

Reviewed: https://review.openstack.org/134544
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=e91d469704046db19356fbbe063ba7e541b24e65
Submitter: Jenkins
Branch: master

commit e91d469704046db19356fbbe063ba7e541b24e65
Author: sridhargaddam <email address hidden>
Date: Fri Nov 14 14:26:53 2014 +0000

    Curl statements to include globoff for IPv6 URLs

    Novaclient displays curl statements for debugging/troubleshooting
    purposes. For IPv6 URLs, curl requires --globoff to be passed in
    the arguments. Since novaclient does not use curl directly, this
    patch displays the curl commands with globoff option which works
    for both IPv4 and IPv6 URLs.

    Closes-Bug: #1228744
    Change-Id: Ib7099e8e3bbc15f29bbaa1db37ef21e78a74e7bc

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-keystoneclient:
assignee: nobody → Sridhar Gaddam (sridhargaddam)
Changed in python-glanceclient:
assignee: nobody → Sridhar Gaddam (sridhargaddam)
Changed in python-heatclient:
assignee: nobody → Sridhar Gaddam (sridhargaddam)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

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

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

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

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

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

Changed in python-heatclient:
status: New → In Progress
Changed in python-heatclient:
importance: Undecided → Low
Changed in oslo-incubator:
assignee: nobody → Sridhar Gaddam (sridhargaddam)
Changed in oslo-incubator:
status: New → In Progress
Revision history for this message
Sridhar Gaddam (sridhargaddam) wrote :
Ben Nemec (bnemec)
Changed in oslo-incubator:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/136327
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=c859cb71c2236a8aa3a59b9ce07ce8e60d763254
Submitter: Jenkins
Branch: master

commit c859cb71c2236a8aa3a59b9ce07ce8e60d763254
Author: sridhargaddam <email address hidden>
Date: Fri Nov 21 12:58:10 2014 +0000

    Curl statements to include globoff for IPv6 URLs

    python-keystoneclient displays curl statements for debugging/troubleshooting
    purposes. For IPv6 URLs, curl requires --globoff to be passed in the
    arguments. Since keystoneclient does not use curl directly, this patch
    displays the curl commands with globoff option which works for both
    IPv4 and IPv6 URLs.
    Fix adapted from python-novaclient Ib7099e8e3bbc15f29bbaa1db37ef21e78a74e7bc

    Closes-Bug: #1228744
    Change-Id: Ia05e622dea653597d412ffe0987077616fbb18af

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Changed in oslo-incubator:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/136332
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=0d69f021d961c0458d93bcbecdfbe5e53434cf0c
Submitter: Jenkins
Branch: master

commit 0d69f021d961c0458d93bcbecdfbe5e53434cf0c
Author: sridhargaddam <email address hidden>
Date: Fri Nov 21 13:11:38 2014 +0000

    Curl statements to include globoff for IPv6 URLs

    python-heatclient displays curl statements for debugging/troubleshooting
    purposes. For IPv6 URLs, curl requires --globoff to be passed in the
    arguments. Since heatclient does not use curl directly, this patch
    displays the curl commands with globoff option which works for both
    IPv4 and IPv6 URLs.
    Fix adapted from python-novaclient Ib7099e8e3bbc15f29bbaa1db37ef21e78a74e7bc

    Closes-Bug: #1228744
    Change-Id: I1ace9268b09e6fc0d0c0ff02ce1f2e31940d961d

Changed in python-heatclient:
status: In Progress → Fix Committed
Changed in python-keystoneclient:
milestone: none → 1.0.0
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo-incubator:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/136329
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=465c5cef8d23dcd5400fdfb1aae6d7155c0d44a6
Submitter: Jenkins
Branch: master

commit 465c5cef8d23dcd5400fdfb1aae6d7155c0d44a6
Author: sridhargaddam <email address hidden>
Date: Fri Nov 21 13:04:29 2014 +0000

    Curl statements to include globoff for IPv6 URLs

    python-glanceclient displays curl statements for debugging/troubleshooting
    purposes. For IPv6 URLs, curl requires --globoff to be passed in the
    arguments. Since glanceclient does not use curl directly, this patch
    displays the curl commands with globoff option which works for both
    IPv4 and IPv6 URLs.
    Fix adapted from python-novaclient Ib7099e8e3bbc15f29bbaa1db37ef21e78a74e7bc

    Closes-Bug: #1228744
    Change-Id: Ie02c4e75ca1ab995102aa55bbff39b2161218b2d

Changed in python-glanceclient:
status: In Progress → Fix Committed
Changed in python-heatclient:
milestone: none → v0.3.0
Changed in python-novaclient:
status: Fix Committed → Fix Released
Changed in python-heatclient:
status: Fix Committed → Fix Released
Louis Taylor (kragniz)
Changed in python-glanceclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo-incubator:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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