From 55e6021ce36b2f2d4ef9222252b9ab784f67d9f7 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Wed, 9 May 2012 19:20:46 +0000 Subject: Defer image_ref update to manager on rebuild We shouldn't update the DB and use it for passing the new image_ref for a rebuild. This causes a usage exists notification for the new image instead of the old... and technically the new image is not accurate until we shutdown the old instance and try building the new one.. Fixes bug 997245 Change-Id: Ia4bd4b8af90080a11875d9ee56661286bc3f5593 --- nova/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index 0c20dd34d..69011fb61 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1259,6 +1259,11 @@ def generate_glance_url(): return "http://%s:%d" % (FLAGS.glance_host, FLAGS.glance_port) +def generate_image_url(image_ref): + """Generate a image URL from an image_ref.""" + return "%s/images/%s" % (generate_glance_url(), image_ref) + + @contextlib.contextmanager def logging_error(message): """Catches exception, write message to the log, re-raise. -- cgit