From 0c59003b1cc2ce17e3215e6c69b0dc2407f1b38b Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Thu, 26 Jul 2012 08:59:24 +0000 Subject: Refactor glance image service code Fixes bug 1029397 This adds better retry support, making sure that if we need to retry requests to glance, we cycle through all hosts before potentially attemping the hosts that failed. The old random selection could cause immediate retrying of the same host that failed. This also adds logging of the host:port that failed and fixes a bug in the retry test, which didn't actually successfully test retrying. Tests for new code added. Change-Id: I400616081e1e547b9ca2e0be622889d3a399a5bf --- nova/exception.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index b63406427..981363fa1 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -200,7 +200,8 @@ class VirtualInterfaceMacAddressException(NovaException): class GlanceConnectionFailed(NovaException): - message = _("Connection to glance failed") + ": %(reason)s" + message = _("Connection to glance host %(host)s:%(port)s failed: " + "%(reason)s") class MelangeConnectionFailed(NovaException): -- cgit