Closed fberndtsson closed 3 weeks ago
@fberndtsson numberOfRunsUntilHostReboot
reboots the machine running Cilicon after a certain number of runs (VM restarts). This is an optional feature to have a fresh boot every once in a while.
Cilicon will restart its VM when the command that it runs via SSH exits. Since I don't use gitlab, I can't replicate your issue, but to me it looks like the command that is run never exits. This theory is supported by the fact that your log claims to be a "multi-runner" with max_builds=0
. Maybe Gitlab added a multi-runner capability recently which would have broken the provisioner. It should be possible to fix this by changing run
to run-single
here. Would it be possible for you to test this? If you don't have XCode I can create a test build for you.
@ast3150 Might know more about this.
@Marcocanc
Thanks for the hint, it sounds like it could be it! I am a novice mac-developer, give me a few days and I will have tried out your suggestion.
Will post an update in a couple of days (or earlier) when I have tried it.
gitlab-runner run-single
Made the virtual machine restart. No job was executed.
`Downloaded GitLab Runner Binary from Source successfully Starting GitLab Runner... Runtime platform arch=arm64 os=darwin pid=774 revision=44feccdf version=17.0.0 FATAL: Missing URL ---------- Shutting Down ---------- Configuring GitLab Runner... Successfully configured GitLab Runner Downloading GitLab Runner Binary from Source % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 2 61.5M 2 1620k 0 0 1767k 0 0:00:35 --:--:-- 0:00:35 1767k 100 61.5M 100 61.5M 0 0 10.9M 0 0:00:05 0:00:05 --:--:-- 12.7M Downloaded GitLab Runner Binary from Source successfully Starting GitLab Runner... Runtime platform `
According to docs;
gitlab-runner run-single -c ~/.gitlab-runner/config.toml -r runner-name
should be used. MR
Tried with:
let runCommand = "gitlab-runner run-single -c ~/.gitlab-runner/config.toml"
Made; gitlab-runner go crazy. With error message:
FATAL: flag provided but not defined: -c
before restart.
Currently trying to see that the file is existing within the vm. Then also, if something else needs to be modified to execute command with parameters.
The MR: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/4789/diffs was merged 17th of May. Latest gitlab-runner released 16th of May, so the gitlab docs are incorrect as of now. Next version of gitlab-runner hopefully have the -c option released.
Will continue trying it to work when next version of gitlab-runner released.
@fberndtsson if the issue is indeed in the latest version of GL Runner, you can manually specify the download URL in your config and set an older version.
The issue is that we want to use the parameters from a file, and that feature is not included in the gitlab-runner as of now.
I want to see if gitlab enable it in the next version of the gitlab-runner. As it should be according to the documentation.
If the feature is missing in next version of gitlab-runner, I will see if we can get it running with the commandline-parameters. Unsure if there is any security implication of having the token on the command-line.
@fberndtsson If I understand you correctly, this is an issue of the gitlab runner and not of Cilicon. I will therefore close the ticket. If I misunderstood, feel free to reopen it.
Sorry for being a bit slow @Marcocanc . Have been testing out the patch the last week to ensure that it worked properly.
The paramter -c don't exists in gitlab-runner mode run-single even in 17.2.
Workaround is to send it via the cmd to use the gitlab-runner run-single -u
Issue:
Cilicon 2.2.0 vm don't restart when gitlab job is done as shown in GIF. Followed setup in Readme.md
Background:
From the cilion cycle the vm is stopped and removed after a job is done.
In the instructions it is not mentioned any setting required to restart Cilion VM. From the additional swift settings it seems numberOfRunsUntilHostReboot is the most likley setting to make it restart.
Settings
Cilicon version: v2.2.0
Mac version
cat ~/cilicon.yml
Running:
. . .