Skip to content

Runner says that service is not present on list of allowed services, but it is

Summary

Problem 1: Wildcards are a bit confusing on allowed_services field

Problem 2: Solution given by the gitlab runner is a broken link

Steps to reproduce

I have a runner set up like this in config.toml:

[[runners]]
  name = "Ruby"
  url = "<url>"
  token = "<token>"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "ruby:latest"
    privileged = false
    disable_cache = false
    volumes = ["/cache"]
    allowed_images = ["ruby:*"]
    allowed_services = ["mongo:*", "redis:*", "postgres:*", "mysql:*", "elasticsearch:*"]

In my .gitlab-ci.yml I set the desired services as below:

services:
  - postgres
  - elasticsearch
  - redis

When gitlab-ci tries to run the build, I get the following error message:

Running with gitlab-ci-multi-runner 1.7.1 (f896af7)
Using Docker executor with image ruby:latest ...

ERROR: The postgres is not present on list of allowed services
- mongo:*
- redis:*
- postgres:*
- mysql:*
- elasticsearch:*

Please check runner's configuration: http://doc.gitlab.com/ci/docker/using_docker_images.html#overwrite-image-and-services

Expected behavior

I would expected "postgres:*" to be a match to "postgres", as in the docker world it is the same as "postgres:latest", which does match the allowed_services wildcard.

Also, the link given in "Please check runner's configuration" is broken.

Gitlab Version

gitlab 8.12.7 gitlab-ci-multi-runner 1.7.1