MCPcopy
hub / github.com/cubefs/cubefs / containerStatus

Function containerStatus

deploy/cmd/docker.go:193–201  ·  view source on GitHub ↗
(nodeUser, node, containerName string)

Source from the content-addressed store, hash-verified

191}
192
193func containerStatus(nodeUser, node, containerName string) (string, error) {
194 cmd := exec.Command("ssh", nodeUser+"@"+node, "docker inspect --format='{{.State.Status}}' "+containerName)
195 output, err := cmd.Output()
196 if err != nil {
197 return "", fmt.Errorf("failed to pull mirror %s on node %s", containerName, node)
198 }
199
200 return string(output), nil
201}

Callers 1

infoOfClusterFunction · 0.85

Calls 2

OutputMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected