nova-consoleauth memcached unicode

Bug #1086510 reported by Adam Jacob Muller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Committed
Undecided
Unassigned

Bug Description

nova-consoleauth appears to utilize unicode strings internally, the memcached library will not accept unicode strings as keys/values

2012-12-04 13:31:43 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/memcache.py", line 1014, in check_key
2012-12-04 13:31:43 TRACE nova.openstack.common.rpc.amqp "Keys must be str()'s, not unicode. Convert your unicode "
2012-12-04 13:31:43 TRACE nova.openstack.common.rpc.amqp MemcachedStringEncodingError: Keys must be str()'s, not unicode. Convert your unicode strings using mystring.encode(charset)!

Revision history for this message
Adam Jacob Muller (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlrqbgszpjpwcmvk-launchpad) wrote :

simply casting the unicode strings to regular strings str(token), etc, fixes things.

        self.mc.set(str(token), str(data), FLAGS.console_token_ttl)

        token_str = self.mc.get(str(token))

Revision history for this message
Adam Jacob Muller (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlrqbgszpjpwcmvk-launchpad) wrote :

This is while using:
Package: python-memcache
Version: 1.48-1
Homepage: http://www.tummy.com/Community/software/python-memcached/

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Changed in nova:
status: New → Fix Committed
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.