From a35a93d814688f4f1df3c5bda3fa53aafa42752f Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Thu, 13 Apr 2017 21:09:50 -0400 Subject: [PATCH] Fix the logic to set container state to Error According to https://docs.docker.com/engine/api/v1.23/ , the 'Error' field returned by 'inspect' is a string, but we treated it as boolean in before. As a result, the state was incorrect. Change-Id: If85605ed4931c0c021090cf752f80b5200f08f33 --- zun/container/docker/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zun/container/docker/driver.py b/zun/container/docker/driver.py index 6db88ed35..e21717681 100644 --- a/zun/container/docker/driver.py +++ b/zun/container/docker/driver.py @@ -165,7 +165,7 @@ class DockerDriver(driver.ContainerDriver): status = response.get('State') if status: status_detail = '' - if status.get('Error') is True: + if status.get('Error'): container.status = consts.ERROR status_detail = self.format_status_detail( status.get('FinishedAt'))