mirror of https://github.com/docker/docs.git
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:
parent
accf600c32
commit
ad5040c9f4
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue