From 3dd815fe2ea6152976a5e3803e9271b7dc08545e Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Wed, 14 Aug 2013 17:23:12 +0800 Subject: [PATCH] Fix unicode key of azcache can't be stored to memcache The memcache library we are using assumes all strings passed to it are plain ascii, so we need to convert unicode to string. Fix bug #1212164 Change-Id: Ibf36e6b096893cb9f056371bb43cbb441cae6e32 --- nova/availability_zones.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/availability_zones.py b/nova/availability_zones.py index d627fa0d7..68b447565 100644 --- a/nova/availability_zones.py +++ b/nova/availability_zones.py @@ -56,7 +56,7 @@ def _reset_cache(): def _make_cache_key(host): - return "azcache-%s" % host + return "azcache-%s" % host.encode('utf-8') def set_availability_zones(context, services):