Add IPv6 address when emulating links functionality

What does this MR do?

  • Fixes IPv6 support for the default network adaptor.
  • Fixes docker services timeout not respecting -1/low timeouts and also succeeding.

Manual testing

  • Configure Docker's default network adaptor to use IPv6 /etc/docker/daemon.json:

    {
      "ipv6": true,
      "fixed-cidr-v6": "2001:db8:1::/64"
    }

Restart daemon.

job:
  image: golang
  services:
    - name: registry.gitlab.com/gitlab-org/ci-cd/tests/liveness:0.1.0-amd64-2acfbea1
      alias: whatever
      command:
        - 'server'
        - '--addr'
        - ':8333'
      variables:
        HEALTHCHECK_TCP_PORT: 8333
  script:
   - cat /etc/hosts
   - go install gitlab.com/gitlab-org/ci-cd/tests/liveness@latest
   - 'liveness client --header "X-Status: 200" --data "hello" "whatever:8333/?timeout=5s"'

Test this job before and after this change. Notice that /etc/hosts contains an IPv6 entry for the alias whatever.


Also test service timeout. Configure Runner with:

  [runners.docker]
    wait_for_services_timeout = -1

Services should come up fine, but healthcheck effectively skipped.

What are the relevant issue numbers?

Closes #39173 (closed)

Closes #39172 (closed)

Edited by Arran Walker

Merge request reports

Loading