Skip to content
Browse files

Convert host value from unicode to a string.

The memcached API expects string format, not unicode.
Convert the host value to a string before creating
the cache_key and passing it to memcached.

Fixes: bug #1158958
Change-Id: I26e86b7fb61b4b3380a14686bd2faa9f58017999
(cherry picked from commit a11c41b)
  • Loading branch information...
Dan Florea authored and vishvananda committed Mar 27, 2013
1 parent fd66545 commit 232f874d3663248f2a82eb138c0e7bd142593746
Showing with 1 addition and 1 deletion.
  1. +1 −1 nova/api/openstack/compute/contrib/
@@ -37,7 +37,7 @@ def __init__(self): = memorycache.get_client()

def _get_host_az(self, context, instance):
host = instance.get('host')
host = str(instance.get('host'))
if not host:
return None
cache_key = "azcache-%s" % host

0 comments on commit 232f874

Please sign in to comment.
You can’t perform that action at this time.