Set the container status to pending if the underlying host is not healthy

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2014-11-21 18:03:46 -08:00
parent accf600c32
commit ad5040c9f4
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ func getContainersJSON(c *context, w http.ResponseWriter, r *http.Request) {
if !strings.Contains(tmp.Status, "Up") && !all {
continue
}
if !container.Node().IsHealthy() {
tmp.Status = "Pending"
}
// TODO remove the Node ID in the name when we have a good solution
tmp.Names = make([]string, len(container.Names))
for i, name := range container.Names {