mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 18:27:49 +00:00
Check for either Docker or Containerd getting active for e2e_node tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
@@ -668,13 +668,15 @@ func createInstance(imageConfig *internalGCEImage) (string, error) {
|
||||
// TODO(random-liu): Remove the docker version check. Use some other command to check
|
||||
// instance readiness.
|
||||
var output string
|
||||
output, err = remote.SSH(name, "docker", "version")
|
||||
output, err = remote.SSH(name, "sh", "-c",
|
||||
"'systemctl list-units --type=service --state=running | grep -e docker -e containerd'")
|
||||
if err != nil {
|
||||
err = fmt.Errorf("instance %s not running docker daemon - Command failed: %s", name, output)
|
||||
err = fmt.Errorf("instance %s not running docker/containerd daemon - Command failed: %s", name, output)
|
||||
continue
|
||||
}
|
||||
if !strings.Contains(output, "Server") {
|
||||
err = fmt.Errorf("instance %s not running docker daemon - Server not found: %s", name, output)
|
||||
if !strings.Contains(output, "docker.service") &&
|
||||
!strings.Contains(output, "containerd.service") {
|
||||
err = fmt.Errorf("instance %s not running docker/containerd daemon: %s", name, output)
|
||||
continue
|
||||
}
|
||||
instanceRunning = true
|
||||
|
Reference in New Issue
Block a user