Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 4

Options to prevent auto updating self-hosted runner

Solved! Go to Solution.

We’re trying to run self-hosted runners inside our kubernetes cluster, it worked fine until our image didn’t contain the latest runner:

 

Runner update in progress, do not shutdown runner.Downloading 2.161.0 runner
Waiting for current job finish running.
Generate and execute update script.
Runner will exit shortly for update, should back online within 10 seconds.

 

I know that runner will automatically update to latest version and exit for a while. However, this update would fail every time and exit, resulting in kubernetes spinning up another Pod, which finally we see an infinite loop.Is there an option to disable such behavior in ./run.sh?

3 Replies
Solution
GitHub Partner
Message 2 of 4

Re: Options to prevent auto updating self-hosted runner

Have you configured your self-hosted runner as a service? Configure the self-hosted runner as a service can avoid automatic update failures.
You can reference this earlier reported ticket: https://github.community/t5/GitHub-Actions/self-hosted-runner-update-protocol/td-p/37930

Copilot Lvl 2
Message 3 of 4

Re: Options to prevent auto updating self-hosted runner

Thanks for your reply, but it seems that running as service didn't help, is it something to do with container/kubernetes environment? This is output:

 

Runner update in progress, do not shutdown runner.
11/28/2019 7:04:38 PM Downloading 2.161.0 runner
11/28/2019 7:04:41 PM Waiting for current job finish running.
11/28/2019 7:04:41 PM Generate and execute update script.
11/28/2019 7:04:41 PM Runner will exit shortly for update, should back online within 10 seconds.
11/28/2019 7:04:44 PM /_work/_update.sh: line 96: /bin/mv: No such file or directory
11/28/2019 7:04:44 PM Runner listener exited with error code 3
11/28/2019 7:04:44 PM Runner listener exit because of updating, re-launch runner in 5 seconds.
11/28/2019 7:04:49 PM Starting Runner listener with startup type: service
11/28/2019 7:04:49 PM Started listener process
11/28/2019 7:04:49 PM events.js:177
11/28/2019 7:04:49 PM throw er; // Unhandled 'error' event
11/28/2019 7:04:49 PM ^
11/28/2019 7:04:49 PM
11/28/2019 7:04:49 PM Error: spawn /bin/Runner.Listener ENOENT
11/28/2019 7:04:49 PM at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
11/28/2019 7:04:49 PM at onErrorNT (internal/child_process.js:456:16)
11/28/2019 7:04:49 PM at processTicksAndRejections (internal/process/task_queues.js:84:9)
11/28/2019 7:04:49 PM Emitted 'error' event at:
11/28/2019 7:04:49 PM at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
11/28/2019 7:04:49 PM at onErrorNT (internal/child_process.js:456:16)
11/28/2019 7:04:49 PM at processTicksAndRejections (internal/process/task_queues.js:84:9) {
11/28/2019 7:04:49 PM errno: 'ENOENT',
11/28/2019 7:04:49 PM code: 'ENOENT',
11/28/2019 7:04:49 PM syscall: 'spawn /bin/Runner.Listener',
11/28/2019 7:04:49 PM path: '/bin/Runner.Listener',
11/28/2019 7:04:49 PM spawnargs: [ 'run', '--startuptype', 'service' ]
11/28/2019 7:04:49 PM }
Copilot Lvl 2
Message 4 of 4

Re: Options to prevent auto updating self-hosted runner

We figured out there was something wrong with our WORKDIR settings, which cannot be root folder in this case.