Skip to content

Docker compose healthcheck on lcow #6445

@dmitriykanarskiy

Description

@dmitriykanarskiy

Docker compose can't execute container healthcheck when running windows docker engine with lcow enabled

It seams that healthcheck test command completely ignores platform option from service configuration, no matter, the command syntax you use.

Output of docker-compose version

docker-compose version 1.23.2, build 1110ad01
docker-py version: 3.6.0
CPython version: 3.6.6
OpenSSL version: OpenSSL 1.0.2o  27 Mar 2018

Output of docker version

Client:
 Version:       0.0.0-dev
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    c3991d06
 Built: Sun Mar 25 23:30:16 2018
 OS/Arch:       windows/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      master-dockerproject-2018-07-01
  API version:  1.38 (minimum version 1.24)
  Go version:   go1.10.3
  Git commit:   8d1b280
  Built:        Mon Jul  2 00:00:39 2018
  OS/Arch:      windows/amd64
  Experimental: true

Output of docker-compose config
(Make sure to add the relevant -f and other flags)

networks:
  nat_network:
    driver: nat
services:
  zookeeper:
    environment:
      ZOOKEEPER_CLIENT_PORT: '2181'
      ZOOKEEPER_SERVER_ID: '1'
      ZOOKEEPER_SYNC_LIMIT: '2'
      ZOOKEEPER_TICK_TIME: '2000'
      ZOO_MAX_CLIENT_CNXNS: '3000'
    healthcheck:
      interval: 10s
      retries: 5
      test:
      - CMD-SHELL
      - -c
      - echo ruok | nc -w 2 -q 2 localhost 2181 | grep imok
      timeout: 5s
    hostname: zookeeper
    image: confluentinc/cp-zookeeper:3.2.4
    networks:
      nat_network: null
    platform: linux
    ports:
    - 2181/tcp
version: '2.4'

Observed result

Healthcheck fails

Expected result

Healthcheck passes

Stacktrace / full error message

{"Start":"2019-01-08T07:01:05.9826339-08:00","End":"2019-01-08T07:01:06.4507418-08:00","ExitCode":-1,"Output":"container 508c83343e5acd662ba5ad494a6cf39f376859fc3a0d0b02a091a88c8f1c3c7a encountered an error during CreateProcess: failure in a Windows system call: Unspecified error (0x80004005) extra info: {\"CommandArgs\":[\"cmd\",\"/S\",\"/C\",\"-c\",\"echo ruok | nc -w 2 -q 2 localhost 2181 | grep imok\"],\"WorkingDirectory\":\"/\",\"Environment\":{\"APT_ALLOW_UNAUTHENTICATED\":\"false\",\"COMPONENT\":\"zookeeper\",\"CONFLUENT_DEB_VERSION\":\"1\",\"CONFLUENT_MAJOR_VERSION\":\"3\",\"CONFLUENT_MINOR_VERSION\":\"2\",\"CONFLUENT_PATCH_VERSION\":\"1\",\"CONFLUENT_VERSION\":\"3.2.1\",\"HOSTNAME\":\"zookeeper\",\"KAFKA_VERSION\":\"0.10.2.2\",\"LANG\":\"C.UTF-8\",\"PATH\":\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\"PYTHON_PIP_VERSION\":\"8.1.2\",\"PYTHON_VERSION\":\"2.7.9-1\",\"SCALA_VERSION\":\"2.11\",\"ZOOKEEPER_CLIENT_PORT\":\"2181\",\"ZOOKEEPER_SERVER_ID\":\"1\",\"ZOOKEEPER_SYNC_LIMIT\":\"2\",\"ZOOKEEPER_TICK_TIME\":\"2000\",\"ZOO_MAX_CLIENT_CNXNS\":\"3000\",\"ZULU_OPENJDK_VERSION\":\"8=8.17.0.3\"},\"CreateStdInPipe\":true,\"CreateStdOutPipe\":true,\"CreateStdErrPipe\":true,\"ConsoleSize\":[0,0]}"}

Additional information

Windows Server Datacenter 6.3, Server Core, Build 1709

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions