summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorDan Florea <dflorea@cisco.com>2013-03-26 23:00:32 -0700
committerDan Florea <dflorea@cisco.com>2013-03-28 04:56:43 -0700
commita11c41b48dff83a91eaa65630cc6aeb0e51e6461 (patch)
tree85fa1b8829eecd59d7d079ad1a43442dea609679 /nova/api
parente9912c6dd1c53a59822cc4332a7de0630f1ca0bb (diff)
downloadnova-a11c41b48dff83a91eaa65630cc6aeb0e51e6461.tar.gz
nova-a11c41b48dff83a91eaa65630cc6aeb0e51e6461.tar.xz
nova-a11c41b48dff83a91eaa65630cc6aeb0e51e6461.zip
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
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/extended_availability_zone.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/extended_availability_zone.py b/nova/api/openstack/compute/contrib/extended_availability_zone.py
index af557219f..a1ee85bcf 100644
--- a/nova/api/openstack/compute/contrib/extended_availability_zone.py
+++ b/nova/api/openstack/compute/contrib/extended_availability_zone.py
@@ -37,7 +37,7 @@ class ExtendedAZController(wsgi.Controller):
self.mc = 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