Service Aliases not working properly
Summary
I set up a sample job which started a service twice with different aliases, however this did not work properly.
Steps to reproduce
I defined:
services:
- name: internal/teamname/ci-setup-test-host
alias: test-host1
- name: internal/teamname/ci-setup-test-host
alias: test-host2
image:
name: internal/teamname/ansible-runner
ping:
script:
- ping -c1 test-host1 || ping -c1 test-host2
Actual behavior
test-host1 is not pingable.
Expected behavior
Both services are pingable by their respective names.
Relevant logs and/or screenshots
Running with gitlab-ci-multi-runner 9.4.1 (d24b11c)
on NODE (72a23afa)
Using Docker executor with image internal/teamname/ansible-runner ...
Starting service internal/teamname/docker-dind:latest ...
Pulling docker image internal/teamname/docker-dind:latest ...
Using docker image internal/teamname/docker-dind:latest ID=sha256:e252d23095d1ad5b48ad53e9d164c0192383f4970fbf98f168973eb587d6eaf7 for internal/teamname/docker-dind service...
Starting service internal/teamname/ci-setup-test-host:latest ...
Pulling docker image internal/teamname/ci-setup-test-host:latest ...
Using docker image internal/teamname/ci-setup-test-host:latest ID=sha256:999f6cf72a22bccff9bbf431f9d0e70cdefef63854a182f0a3e5f7562a39dcdf for internal/teamname/ci-setup-test-host service...
WARNING: Service internal/teamname/ci-setup-test-host is already created. Ignoring.
WARNING: Service internal/teamname/ci-setup-test-host is already created. Ignoring.
Starting service internal/teamname/ci-setup-test-host:latest ...
Pulling docker image internal/teamname/ci-setup-test-host:latest ...
Using docker image internal/teamname/ci-setup-test-host:latest ID=sha256:999f6cf72a22bccff9bbf431f9d0e70cdefef63854a182f0a3e5f7562a39dcdf for internal/teamname/ci-setup-test-host service...
WARNING: Possibly zombie container runner-72a23afa-project-3255-concurrent-0-internal__teamname__ci-setup-test-host is disconnected from network bridge
Waiting for services to be up and running...
*** WARNING: Service runner-72a23afa-project-3255-concurrent-0-internal__teamname__ci-setup-test-host probably didn't start properly.
Error response from daemon: Conflict. The container name "/runner-72a23afa-project-3255-concurrent-0-internal__teamname__ci-setup-test-host-wait-for-service" is already in use by container "cc23ffc7e91ab7262b0a0f8cd63337177b790b5585dce050ccd00bc8c1b34735". You have to remove (or rename) that container to be able to reuse that name.
Error response from daemon: No such container: 6265f5cbc468f74375661b34a011216804ce62eb2efd3c61bb8f9b8915406673
*********
*** WARNING: Service runner-72a23afa-project-3255-concurrent-0-internal__teamname__ci-setup-test-host probably didn't start properly.
service runner-72a23afa-project-3255-concurrent-0-internal__teamname__ci-setup-test-host-wait-for-service did timeout
*********
Using docker image sha256:5b38c4e83a988a99e4f2fb547cd9ccc30859de1796336dfdf52d215a609a083e for predefined container...
Pulling docker image internal/teamname/ansible-runner ...
Using docker image internal/teamname/ansible-runner ID=sha256:0da4220ac3de915e4c28adb171340cbc8fffb37de65f9b64b52c5a6ee287bbf4 for build container...
Running on runner-72a23afa-project-3255-concurrent-0 via NODE
Cloning repository...
Cloning into '/builds/USERNAME/alias-test'...
Checking out ea28280a as master...
Skipping Git submodules setup
$ ping -c1 test-host1 || ping -c1 test-host2
ping: unknown host
PING test-host2 (192.168.122.4): 56 data bytes
64 bytes from 192.168.122.4: icmp_seq=0 ttl=64 time=0.112 ms
--- test-host2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.112/0.112/0.112/0.000 ms
Environment description
- Custom installation on Debian Jessie 8.9
- docker-ce-17.06
- gitlab-ci-runner 9.4.1
- gitlab-9.4.1
Used GitLab Runner version
- gitlab-ci-runner 9.4.1
Edited by username-removed-72132