VerifiedHTTPSConnection init raises exception

Bug #1060316 reported by Stuart McLaren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Critical
Brian Waldon

Bug Description

I'm seeing the following from head of 'master' to the folsom/stable branch:

 __init__() got multiple values for keyword argument 'key_file')

when I run:

glance --os-auth-token XXX --os-image-url https://localhost:9292 -v --insecure image-list

If I revert the last change (Change-Id: I53a890e6532adb8168961d1d09f938bf439e895c) then
the above works ok.

Debugging...

    def get_connection(self):
        print "XXX44 "
        _class = self.connection_params[0]
        print "XXX44 _class", _class
        print "XXX444", self.connection_params[1]
        print "XXX444", self.connection_params[2]
        try:
            return _class(*self.connection_params[1],
                          **self.connection_params[2])

XXX44 _class glanceclient.common.http.VerifiedHTTPSConnection
XXX444 ('localhost', 9292, '') <<< the empty string here is being treated as 'key_file'
XXX444 {'key_file': None, 'insecure': True, 'cert_file': None, 'ca_file': None, 'timeout': 600.0} <<< key_file also provided as kwarg

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

If I switch the server to http, then the equivalent command works ok:

$ glance --os-auth-token XXX --os-image-url http://localhost:9292 -v --insecure image-list

+--------------------------------------+----------------------+-------------+------------------+------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+----------------------+-------------+------------------+------+--------+
| 0066cf6c-01d3-429c-9493-13a684bbf954 | | raw | bare | 424 | active |
| 0f1b871d-65ba-45e2-b706-50a4b6089446 | | raw | bare | 424 | active |
| 25c31aad-dd82-4dca-a1e2-68c28a149561 | | raw | bare | 432 | active |
+--------------------------------------+----------------------+-------------+------------------+------+--------+

Brian Waldon (bcwaldon)
Changed in python-glanceclient:
assignee: nobody → Brian Waldon (bcwaldon)
milestone: none → v0.5.2
importance: Undecided → Critical
status: New → In Progress
summary: - https access broken?
+ VerifiedHTTPSConnection init raises exception
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/14010

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/14010
Committed: http://github.com/openstack/python-glanceclient/commit/cdc06d9fdb15cd19bd5d26304dfebf092c6c8df8
Submitter: Jenkins
Branch: master

commit cdc06d9fdb15cd19bd5d26304dfebf092c6c8df8
Author: Brian Waldon <email address hidden>
Date: Wed Oct 3 13:52:55 2012 -0700

    Simplify http(s) connection instantiation

    The endpoint parsing and connection instantiation code was too
    complicated and easily broken. This assigns human-readable names to
    instance variables and breaks up the parsing into more understandable
    chunks.

    Fixes bug 1060316.

    Change-Id: I5c5236f90d88b9e797cf0a476aabe8cc7cfa1cc9

Changed in python-glanceclient:
status: In Progress → Fix Committed
Brian Waldon (bcwaldon)
Changed in python-glanceclient:
milestone: v0.5.2 → v0.6.0
Brian Waldon (bcwaldon)
Changed in python-glanceclient:
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.