From 1c26351925cc92130efa86ddd9fd1b3ed9d35c62 Mon Sep 17 00:00:00 2001
From: Steven Dake <stdake@cisco.com>
Date: Mon, 7 Mar 2016 12:22:18 -0500
Subject: [PATCH] Upgrade fails from 2.0.0->2.0.1

The new image doesn't have an existing old image, so it
ends up not existing.  In this condition, we know that
we are dealing with a version change upgrade.

TrivialFix

Change-Id: Ic2f83c2bb6c34731b60b3430ba66a6324439f0a9
---
 ansible/library/kolla_docker.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py
index 08306c2bd4..9fe84f8cb9 100644
--- a/ansible/library/kolla_docker.py
+++ b/ansible/library/kolla_docker.py
@@ -274,6 +274,8 @@ class DockerWorker(object):
             return True
         new_image = self.check_image()
         current_image = container_info['Image']
+        if not new_image:
+            return True
         if new_image['Id'] != current_image:
             return True