Skip to content

Flaky test: TestDaemonHostGatewayIP #42357

@thaJeztah

Description

@thaJeztah

Seeing this one fail frequently recently, for example, on #42142

--- FAIL: TestDaemonHostGatewayIP (5.47s)
    daemon_linux_test.go:161: [da46784014669] failed to start daemon with arguments [--data-root /go/src/github.com/docker/docker/bundles/test-integration/TestDaemonHostGatewayIP/da46784014669/root --exec-root /tmp/dxr/da46784014669 --pidfile /go/src/github.com/docker/docker/bundles/test-integration/TestDaemonHostGatewayIP/da46784014669/docker.pid --userland-proxy=true --containerd-namespace da46784014669 --containerd-plugins-namespace da46784014669p --containerd /var/run/docker/containerd/containerd.sock --host unix:///tmp/docker-integration/da46784014669.sock --debug --storage-driver overlay2 --host-gateway-ip=6.7.8.9] : [da46784014669] daemon exited during startup: exit status 1

Daemon logs for a failure on arm64:
docker.log

Info about that machine:

Details
 + docker version
 Client: Docker Engine - Community
  Version:           20.10.5
  API version:       1.41
  Go version:        go1.13.15
  Git commit:        55c4c88
  Built:             Tue Mar  2 20:19:31 2021
  OS/Arch:           linux/arm64
  Context:           default
  Experimental:      true

 Server: Docker Engine - Community
  Engine:
   Version:          20.10.5
   API version:      1.41 (minimum version 1.12)
   Go version:       go1.13.15
   Git commit:       363e9a8
   Built:            Tue Mar  2 20:17:22 2021
   OS/Arch:          linux/arm64
   Experimental:     true
  containerd:
   Version:          1.4.4
   GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
  runc:
   Version:          1.0.0-rc93
   GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
  docker-init:
   Version:          0.19.0
   GitCommit:        de40ad0
 + docker info
 Client:
  Context:    default
  Debug Mode: false
  Plugins:
   app: Docker App (Docker Inc., v0.9.1-beta3)
   buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

 Server:
  Containers: 0
   Running: 0
   Paused: 0
   Stopped: 0
  Images: 0
  Server Version: 20.10.5
  Storage Driver: overlay2
   Backing Filesystem: extfs
   Supports d_type: true
   Native Overlay Diff: true
  Logging Driver: json-file
  Cgroup Driver: cgroupfs
  Cgroup Version: 1
  Plugins:
   Volume: local
   Network: bridge host ipvlan macvlan null overlay
   Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
  Swarm: inactive
  Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
  Default Runtime: runc
  Init Binary: docker-init
  containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
  runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
  init version: de40ad0
  Security Options:
   apparmor
   seccomp
    Profile: default
  Kernel Version: 5.4.0-1041-aws
  Operating System: Ubuntu 20.04.2 LTS
  OSType: linux
  Architecture: aarch64
  CPUs: 4
  Total Memory: 7.494GiB
  Name: ip-10-100-127-143
  ID: BVXL:CDJC:ICN6:ER53:HAUW:WQSU:QT43:6BOW:3PZO:KHYE:NTNP:UAA4
  Docker Root Dir: /var/lib/docker
  Debug Mode: false
  Registry: https://index.docker.io/v1/
  Labels:
  Experimental: true
  Insecure Registries:
   127.0.0.0/8
  Live Restore Enabled: true

 WARNING: No swap limit support
 + echo check-config.sh version: 2b0755b936416834e14208c6c37b36977e67ea35
 check-config.sh version: 2b0755b936416834e14208c6c37b36977e67ea35
 + curl -fsSL -o /home/ubuntu/workspace/moby_PR-42142/check-config.sh https://raw.githubusercontent.com/moby/moby/2b0755b936416834e14208c6c37b36977e67ea35/contrib/check-config.sh
 + bash /home/ubuntu/workspace/moby_PR-42142/check-config.sh
 warning: /proc/config.gz does not exist, searching other paths for kernel config ...
 info: reading kernel config from /boot/config-5.4.0-1041-aws ...

 Generally Necessary:
 - cgroup hierarchy: properly mounted [/sys/fs/cgroup]
 - apparmor: enabled and tools installed
 - CONFIG_NAMESPACES: enabled
 - CONFIG_NET_NS: enabled
 - CONFIG_PID_NS: enabled
 - CONFIG_IPC_NS: enabled
 - CONFIG_UTS_NS: enabled
 - CONFIG_CGROUPS: enabled
 - CONFIG_CGROUP_CPUACCT: enabled
 - CONFIG_CGROUP_DEVICE: enabled
 - CONFIG_CGROUP_FREEZER: enabled
 - CONFIG_CGROUP_SCHED: enabled
 - CONFIG_CPUSETS: enabled
 - CONFIG_MEMCG: enabled
 - CONFIG_KEYS: enabled
 - CONFIG_VETH: enabled (as module)
 - CONFIG_BRIDGE: enabled (as module)
 - CONFIG_BRIDGE_NETFILTER: enabled (as module)
 - CONFIG_IP_NF_FILTER: enabled (as module)
 - CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
 - CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
 - CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
 - CONFIG_NETFILTER_XT_MATCH_IPVS: enabled (as module)
 - CONFIG_NETFILTER_XT_MARK: enabled (as module)
 - CONFIG_IP_NF_NAT: enabled (as module)
 - CONFIG_NF_NAT: enabled (as module)
 - CONFIG_POSIX_MQUEUE: enabled

 Optional Features:
 - CONFIG_USER_NS: enabled
 - CONFIG_SECCOMP: enabled
 - CONFIG_SECCOMP_FILTER: enabled
 - CONFIG_CGROUP_PIDS: enabled
 - CONFIG_MEMCG_SWAP: enabled
 - CONFIG_MEMCG_SWAP_ENABLED: missing
     (cgroup swap accounting is currently not enabled, you can enable it by setting boot option "swapaccount=1")
 - CONFIG_BLK_CGROUP: enabled
 - CONFIG_BLK_DEV_THROTTLING: enabled
 - CONFIG_CGROUP_PERF: enabled
 - CONFIG_CGROUP_HUGETLB: enabled
 - CONFIG_NET_CLS_CGROUP: enabled (as module)
 - CONFIG_CGROUP_NET_PRIO: enabled
 - CONFIG_CFS_BANDWIDTH: enabled
 - CONFIG_FAIR_GROUP_SCHED: enabled
 - CONFIG_RT_GROUP_SCHED: missing
 - CONFIG_IP_NF_TARGET_REDIRECT: enabled (as module)
 - CONFIG_IP_VS: enabled (as module)
 - CONFIG_IP_VS_NFCT: enabled
 - CONFIG_IP_VS_PROTO_TCP: enabled
 - CONFIG_IP_VS_PROTO_UDP: enabled
 - CONFIG_IP_VS_RR: enabled (as module)
 - CONFIG_SECURITY_SELINUX: enabled
 - CONFIG_SECURITY_APPARMOR: enabled
 - CONFIG_EXT4_FS: enabled
 - CONFIG_EXT4_FS_POSIX_ACL: enabled
 - CONFIG_EXT4_FS_SECURITY: enabled
 - Network Drivers:
   - "overlay":
     - CONFIG_VXLAN: enabled (as module)
     - CONFIG_BRIDGE_VLAN_FILTERING: enabled
       Optional (for encrypted networks):
       - CONFIG_CRYPTO: enabled
       - CONFIG_CRYPTO_AEAD: enabled
       - CONFIG_CRYPTO_GCM: enabled
       - CONFIG_CRYPTO_SEQIV: enabled
       - CONFIG_CRYPTO_GHASH: enabled
       - CONFIG_XFRM: enabled
       - CONFIG_XFRM_USER: enabled (as module)
       - CONFIG_XFRM_ALGO: enabled (as module)
       - CONFIG_INET_ESP: enabled (as module)
   - "ipvlan":
     - CONFIG_IPVLAN: enabled (as module)
   - "macvlan":
     - CONFIG_MACVLAN: enabled (as module)
     - CONFIG_DUMMY: enabled (as module)
   - "ftp,tftp client in container":
     - CONFIG_NF_NAT_FTP: enabled (as module)
     - CONFIG_NF_CONNTRACK_FTP: enabled (as module)
     - CONFIG_NF_NAT_TFTP: enabled (as module)
     - CONFIG_NF_CONNTRACK_TFTP: enabled (as module)
 - Storage Drivers:
   - "aufs":
     - CONFIG_AUFS_FS: enabled (as module)
   - "btrfs":
     - CONFIG_BTRFS_FS: enabled (as module)
     - CONFIG_BTRFS_FS_POSIX_ACL: enabled
   - "devicemapper":
     - CONFIG_BLK_DEV_DM: enabled
     - CONFIG_DM_THIN_PROVISIONING: enabled (as module)
   - "overlay":
     - CONFIG_OVERLAY_FS: enabled (as module)
   - "zfs":
     - /dev/zfs: present
     - zfs command: missing
     - zpool command: missing

 Limits:
 - /proc/sys/kernel/keys/root_maxkeys: 1000000

 + true

Looking at errors in the daemon logs for that run;

time="2021-05-05T13:18:04.103376819Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=da46784014669
time="2021-05-05T13:18:04.105101019Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=da46784014669p
time="2021-05-05T13:18:05.626629109Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=da46784014669
failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to inject DOCKER in PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables v1.8.2 (legacy): Couldn't load target `DOCKER':No such file or directory

Looks to be iptables / nftables related?

Error creating default "bridge" network:
Failed to program NAT chain:
Failed to inject DOCKER in PREROUTING chain:
iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
iptables v1.8.2 (legacy): Couldn't load target `DOCKER':No such file or directory

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