Gitlab-runner: задание выполнено, но контейнеров нет - PullRequest
0 голосов
/ 10 октября 2019

Я не уверен, что понимаю, что не так с этим gitlab-ci.yml.

image: docker

services:
  - docker:dind

stages: 
  - deploy

before_script:
- docker info
- apk update
- apk upgrade
- apk add python python-dev py-pip build-base libffi-dev openssl-dev
- pip install docker-compose


deploy_sandbox:
  stage: deploy
  only:
    - master
  script:
    - docker-compose up -d --build --force-recreate
  environment: stage

Задание deploy_sandbox выполнено успешно, но на этом новом сервере у меня нет контейнера. Я попытался переустановить gitlab-runner, зарегистрировал его другим способом, убедившись, что он работает с stage, но все еще получил ту же проблему.

Lead

Существует Предупреждение в начале журнала

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

Health check error:
service "runner-fa6cab46-project-14612439-concurrent-0-docker-0-wait-for-service" timeout

Health check container logs:

Service container logs:
level=info msg="Starting up"
level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
level=warning msg="[!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]"
level=info msg="libcontainerd: started new containerd process" pid=18
level=info msg="parsed scheme: \"unix\"" module=grpc
level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
level=info msg="starting containerd" revision=b34a5c8af56e510852c35414db4c1f4fa6172339 version=v1.2.10 
level=info msg="loading plugin "io.containerd.content.v1.content"..." type=io.containerd.content.v1 
level=info msg="loading plugin "io.containerd.snapshotter.v1.btrfs"..." type=io.containerd.snapshotter.v1 
level=warning msg="failed to load plugin io.containerd.snapshotter.v1.btrfs" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" 
level=info msg="loading plugin "io.containerd.snapshotter.v1.aufs"..." type=io.containerd.snapshotter.v1 
level=warning msg="failed to load plugin io.containerd.snapshotter.v1.aufs" error="modprobe aufs failed: "ip: can't find device 'aufs'\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n": exit status 1" 
level=info msg="loading plugin "io.containerd.snapshotter.v1.native"..." type=io.containerd.snapshotter.v1 
level=info msg="loading plugin "io.containerd.snapshotter.v1.overlayfs"..." type=io.containerd.snapshotter.v1 
level=info msg="loading plugin "io.containerd.snapshotter.v1.zfs"..." type=io.containerd.snapshotter.v1 
level=info msg="skip loading plugin "io.containerd.snapshotter.v1.zfs"..." type=io.containerd.snapshotter.v1 
level=info msg="loading plugin "io.containerd.metadata.v1.bolt"..." type=io.containerd.metadata.v1 
level=warning msg="could not use snapshotter aufs in metadata plugin" error="modprobe aufs failed: "ip: can't find device 'aufs'\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n": exit status 1" 
level=warning msg="could not use snapshotter zfs in metadata plugin" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" 
level=warning msg="could not use snapshotter btrfs in metadata plugin" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" 
level=info msg="loading plugin "io.containerd.differ.v1.walking"..." type=io.containerd.differ.v1 
level=info msg="loading plugin "io.containerd.gc.v1.scheduler"..." type=io.containerd.gc.v1 
level=info msg="loading plugin "io.containerd.service.v1.containers-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.service.v1.content-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.service.v1.diff-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.service.v1.images-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.service.v1.leases-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.service.v1.namespaces-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.service.v1.snapshots-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.runtime.v1.linux"..." type=io.containerd.runtime.v1 
level=info msg="loading plugin "io.containerd.runtime.v2.task"..." type=io.containerd.runtime.v2 
level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." type=io.containerd.monitor.v1 
level=info msg="loading plugin "io.containerd.service.v1.tasks-service"..." type=io.containerd.service.v1 
level=info msg="loading plugin "io.containerd.internal.v1.restart"..." type=io.containerd.internal.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.content"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.diff"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.events"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.healthcheck"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.images"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.leases"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.namespaces"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.internal.v1.opt"..." type=io.containerd.internal.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.snapshots"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.tasks"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.version"..." type=io.containerd.grpc.v1 
level=info msg="loading plugin "io.containerd.grpc.v1.introspection"..." type=io.containerd.grpc.v1 
level=info msg=serving... address="/var/run/docker/containerd/containerd-debug.sock" 
level=info msg=serving... address="/var/run/docker/containerd/containerd.sock" 
level=info msg="containerd successfully booted in 0.042946s" 
level=info msg="Setting the storage driver from the $DOCKER_DRIVER environment variable (overlay2)"
level=info msg="parsed scheme: \"unix\"" module=grpc
level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
level=info msg="parsed scheme: \"unix\"" module=grpc
level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
level=info msg="Loading containers: start."
level=warning msg="Running modprobe bridge br_netfilter failed with message: ip: can't find device 'bridge'\nbridge                167936  1 br_netfilter\nstp                    16384  1 bridge\nllc                    16384  2 bridge,stp\nip: can't find device 'br_netfilter'\nbr_netfilter           24576  0 \nbridge                167936  1 br_netfilter\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n, error: exit status 1"
level=info msg="Default bridge (docker0) is assigned with an IP address 172.18.0.0/16. Daemon option --bip can be used to set a preferred IP address"
level=info msg="Loading containers: done."
level=info msg="Docker daemon" commit=a872fc2f86 graphdriver(s)=overlay2 version=19.03.3
level=info msg="Daemon has completed initialization"
level=info msg="API listen on [::]:2375"
level=info msg="API listen on /var/run/docker.sock"
*********

Эта строка может быть причиной: warning msg="Running modprobe bridge br_netfilter failed with message: ip: can't find device 'bridge'\nbridge 167936 1 br_netfilter\nstp. Googleling, я вижу, что эта ошибка связана с использованием пользовательских сетей , но так как это не мой случай, я не уверен, как это исправить, ни является ли это причиной такого странного поведения.

Конвертор

  • Debian 10 (4.19.0-6-amd64)
  • gitlab-runner 12.3.0
...