Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker_disable_cache option is handled incorrectly #351

Closed
sdclarke opened this issue Oct 24, 2024 · 0 comments · Fixed by #352
Closed

docker_disable_cache option is handled incorrectly #351

sdclarke opened this issue Oct 24, 2024 · 0 comments · Fixed by #352

Comments

@sdclarke
Copy link
Contributor

When docker_disable_cache is set to true, the --docker-disable-cache argument is passed twice, with the first instance here incorrectly having the value True passed with it.

This caused the following error when running with gitlab-runner v17.5.1 on the target machine.

FAILED! => {"changed": true, "cmd": ["/usr/bin/gitlab-runner", "register", "--non-interactive", "--url", "https://gitlab.com", "--name", "Codethink riscv-runner-4", "--executor", "docker", "--limit", "0", "--output-limit", "65536", "--docker-image", "alpine:latest", "--docker-privileged", "--docker-disable-cache", "True", "--docker-disable-cache", "--docker-volumes", "casd_socket:/run/casd", "--ssh-user", "", "--ssh-host", "", "--ssh-port", "", "--ssh-identity-file", "", "--token", "<secret>"], "delta": "0:00:00.349497", "end": "2024-10-23 17:13:13.585169", "msg": "non-zero return code", "rc": 1, "start": "2024-10-23 17:13:13.235672", "stderr": "time=\"2024-10-23T17:13:13+01:00\" level=warning msg=\"boolean parameters must be passed in the command line with --docker-disable-cache=true\"\ntime=\"2024-10-23T17:13:13+01:00\" level=warning msg=\"parameters after this may be ignored\"\nRuntime platform                                  \u001b[0;m  arch\u001b[0;m=riscv64 os\u001b[0;m=linux pid\u001b[0;m=22356 revision\u001b[0;m=affd9e7d version\u001b[0;m=17.5.1\nRunning in system-mode.                           \u001b[0;m \n                                                  \u001b[0;m \n\u001b[31;1mPANIC: The registration-token needs to be entered \u001b[0;m ", "stderr_lines": ["time=\"2024-10-23T17:13:13+01:00\" level=warning msg=\"boolean parameters must be passed in the command line with --docker-disable-cache=true\"", "time=\"2024-10-23T17:13:13+01:00\" level=warning msg=\"parameters after this may be ignored\"", "Runtime platform                                  \u001b[0;m  arch\u001b[0;m=riscv64 os\u001b[0;m=linux pid\u001b[0;m=22356 revision\u001b[0;m=affd9e7d version\u001b[0;m=17.5.1", "Running in system-mode.                           \u001b[0;m ", "                                                  \u001b[0;m ", "\u001b[31;1mPANIC: The registration-token needs to be entered \u001b[0;m "], "stdout": "", "stdout_lines": []}

Apologies for the format, the key things to note are the messages boolean parameters must be passed in the command line with --docker-disable-cache=true and parameters after this may be ignored, followed by PANIC: The registration-token needs to be entered.

For avoidance of doubt the token used in the actual run was valid but I've removed it in the paste here.

I removed my docker_disable_cache variable definition, allowing it to default to false, and confirmed that the registration worked correctly after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant