TypeError on unicode token with some openstack setups

Bug #1030897 reported by Patrick Hetu
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
High
Martin Packman
0.5
Fix Released
High
Martin Packman

Bug Description

Using the lastest trunk (561) I had this error in the bootstrap with the openstack provider:

flocon:~$ juju -v bootstrap
2012-07-30 10:30:19,806 DEBUG Initializing juju bootstrap runtime
2012-07-30 10:30:19,815 DEBUG openstack: using auth-mode 'userpass' with http://avoine.dyndns.info:5000/v2.0/
2012-07-30 10:30:20,133 DEBUG openstack: authenticated til u'2012-07-31T14:30:35Z'
2012-07-30 10:30:20,134 DEBUG openstack: GET 'http://avoine.dyndns.info:8774/v1.1/78c586f85d3c411f8a5d402f682e00e7/flavors'
Traceback (most recent call last):
Failure: twisted.web._newclient.RequestGenerationFailed: [<twisted.python.failure.Failure <type 'exceptions.TypeError'>>]
2012-07-30 10:30:20,136 ERROR Traceback (most recent call last):
Failure: twisted.web._newclient.RequestGenerationFailed: [<twisted.python.failure.Failure <type 'exceptions.TypeError'>>]

2012-07-30 10:30:20,136 ERROR [<twisted.python.failure.Failure <type 'exceptions.TypeError'>>]

Turn out to be the token returned by keystone that was in UTF-8 and makes the next Request Generation to fail.
So if I force the str type in the token id recuperation in the _handle_v2_auth function the error go away.
But it surely have a better way to solve this.

Related branches

Revision history for this message
Patrick Hetu (patrick-hetu) wrote :
Revision history for this message
Martin Packman (gz) wrote :

Thanks Patrick. That change is sufficient if the token does not in fact contain any non-ascii characters?

Revision history for this message
Patrick Hetu (patrick-hetu) wrote :

Well, I doesn't and according to keystone specs it never will.
Do you want a merge request?

Revision history for this message
Martin Packman (gz) wrote :

You'd confused me a little by saying UTF-8 in the original report. :)

I'll get to this as part of cleaning up the client code, but feel free to propose a merge now if you're happy doing that.

Martin Packman (gz)
Changed in juju:
importance: Undecided → Medium
status: New → Confirmed
summary: - Openstack provider do not support UTF-8 token
+ TypeError on unicode token with some openstack setups
Changed in juju:
importance: Medium → High
Martin Packman (gz)
Changed in juju:
assignee: nobody → Martin Packman (gz)
status: Confirmed → In Progress
milestone: none → 0.6
Martin Packman (gz)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
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.