GitLab CI调查超时

时间:2018-08-13 08:53:42

标签: gitlab docker-in-docker

我在Kubernetes中运行了一个GitLab安装,突然之间,我与dind的连接已停止工作。这个问题开始出现在大约30个项目中,而另一个项目中仍然存在,并且没有任何更改。

内部版本出现以下错误:

*** WARNING: Service runner-c542f8fe-project-3-concurrent-0-docker-0 probably didn't start properly.

Health check error:
service "runner-c542f8fe-project-3-concurrent-0-docker-0-wait-for-service" timeout

Health check container logs:


Service container logs:
2018-08-13T08:40:53.274661600Z mount: permission denied (are you root?)
2018-08-13T08:40:53.274713900Z Could not mount /sys/kernel/security.
2018-08-13T08:40:53.274730800Z AppArmor detection and --privileged mode might break.
2018-08-13T08:40:53.275949300Z mount: permission denied (are you root?)

*********

我正在特权容器运行,如我的/etc/gitlab-runner/config.toml所示:

metrics_server = ":9252"
concurrent = 10
check_interval = 30

[[runners]]
  name = "mothy-jackal-gitlab-runner-bb76cb464-7fq6z"
  url = "[redacted]"
  token = "[redacted]"
  executor = "kubernetes"
  [runners.cache]
  [runners.kubernetes]
    host = ""
    image = "ubuntu:16.04"
    namespace = "gitlab"
    namespace_overwrite_allowed = ""
    privileged = true
    cpu_request = "100m"
    memory_request = "128Mi"
    service_cpu_request = "100m"
    service_memory_request = "128Mi"
    service_account_overwrite_allowed = ""
    [runners.kubernetes.volumes]

我发现与确保跑步者享有特权无关的唯一其他解决方案是this one。我尝试将.gitlab-ci.yaml中的变量设置为此:

variables:
  DOCKER_HOST: "tcp://docker:2375"
  DOCKER_DRIVER: overlay

错误仍然相同。

值得注意的是,根据另一篇文章,以下命令的输出:

bash-4.3# find /lib/modules/`uname -r`/kernel/ -type f -name "overlay*"
find: /lib/modules/4.4.111-k8s/kernel/: No such file or directory
bash-4.3# lsmod | grep overlay
overlay                45056 12

请注意“没有此类文件或目录” 错误。

我很困惑,并且在注册表阶段构建失败,所以我无法发布。哪里有指针?

谢谢。

编辑
这不是一个解决方案,但是我注意到发生这种情况是因为我为此项目设置了专门的执行者。一旦我删除了它,它再次起作用。不是解决方案,而是对遇到相同问题的任何人的重要信息。

0 个答案:

没有答案