|
|
|
@ -100,7 +100,7 @@ func printClusters(all bool) { |
|
|
|
|
table.SetAlignment(tablewriter.ALIGN_CENTER) |
|
|
|
|
table.SetHeader([]string{"NAME", "IMAGE", "STATUS", "WORKERS"}) |
|
|
|
|
|
|
|
|
|
tableEmpty := true; |
|
|
|
|
tableEmpty := true |
|
|
|
|
|
|
|
|
|
for _, cluster := range clusters { |
|
|
|
|
workersRunning := 0 |
|
|
|
@ -123,7 +123,7 @@ func printClusters(all bool) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Classify cluster state: Running, Stopped or Abnormal
|
|
|
|
|
func getClusterStatus(server types.Container, workers []types.Container) (string) { |
|
|
|
|
func getClusterStatus(server types.Container, workers []types.Container) string { |
|
|
|
|
// The cluster is in the abnromal state when server state and the worker
|
|
|
|
|
// states don't agree.
|
|
|
|
|
for _, w := range workers { |
|
|
|
@ -138,7 +138,6 @@ func getClusterStatus(server types.Container, workers []types.Container) (string |
|
|
|
|
return "stopped" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return server.State |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|