Task Setup Error(Docker Mode)

  • After running agola/executor in split for servrel days. When build a task got err:
Starting pod.
{"status":"Pulling from alpine/git","id":"latest"}
{"status":"Digest: sha256:8f5659025d83a60e9d140123bb1b27f3c334578aef10d002da4e5848580f1a6c"}
{"status":"Status: Image is up to date for alpine/git:latest"}
Pod failed to start. Error: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/mnt/agola/agola-toolbox\": stat /mnt/agola/agola-toolbox: no such file or directory": unknown

!

  • Then reInit executor, the task setup will be ok.

It seems agola-toolbox (/tmp/agola/bin/agola-toolbox) in your docker host has been deleted:

Pod failed to start. Error: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/mnt/agola/agola-toolbox\": stat /mnt/agola/agola-toolbox: no such file or directory": unknown

The file is created on the host, if it does not exist, when the executor starts and it needs to be mounted by any container as /mnt/agola/agola-toolbox.

Do you have something, like tmpwatch, that automatically cleans up the /tmp filesystem on you docker host?

@camandel it’s very probably what you said. We should put the agola toolbox in another place by default (or add an option to define it), or just periodically touch the agola-toolbox mtime.

  • Yes, Just should be this reason, now it’s exist in the docker host
[root@ten-vm1 agola]# ll /tmp/agola/bin/agola-toolbox
-rwxr-xr-x 1 root root 5530986 Dec  3 23:11 /tmp/agola/bin/agola-toolbox
  • about host tmp clean

I installed agola in a cloud-VM, there be non tmpwatch installed in the host, and there seem non auto-clean in /etc/cron

[root@ten-vm1 etc]# tree cron*
cron.d
|-- 0hourly
`-- sysstat
cron.daily
|-- logrotate
|-- man-db.cron
`-- mlocate
cron.deny [error opening dir]
cron.hourly
`-- 0anacron
cron.monthly
crontab [error opening dir]
cron.weekly

In systemd based distros the tmpwatch has been superseded by systemd-tmpfiles clean services and timers.