self-hosted runner update protocol? #26364
-
I was surprised to see that my self-hosted runner (Centos 7) tried to update itself (not mentioned in https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#communication-between-self-hosted-runners-and-github ):
The problem is: even after I restart the service, the next time a job should start, the same cycle happens again, so my runner is now stuck. How is this update process for self-hosted runners supposed to work? |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
Hey @clausreinke , The Runner is expected to automatically update, we will make sure to update the documentation to ensure this does not appear as a surprise. It should just update and pick up another job. The runner contains a list of text diagnostic log files, located in the |
Beta Was this translation helpful? Give feedback.
-
Hi @thboop , good to know (documentation: specifically the sections on differences and communication led me to believe that self-hosted runners were not yet self-updating). The Runner log is included below (looks as if the update was nearly done?). I had to delete a few lines to stay in the message length limit. Thanks, Claus
|
Beta Was this translation helpful? Give feedback.
-
Thanks @clausreinke ! Could you provide the rest of the logs? Also, can you confirm you are still seeing the issue now? |
Beta Was this translation helpful? Give feedback.
-
The only lines I deleted where of the I just cancelled the outstanding jobs, restarted the runner and re-ran the checks for the last job - same result. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick follow up! It looks like the update script is running, but the runner fails to update. When we run the update script, we end up creating a log file in the same location, (the _diag) folder. It is prefixed with “SelfUpdate”. Could you please provide the logs from the file? Thank you for your patience! |
Beta Was this translation helpful? Give feedback.
-
Not much in those files, I’m afraid:
None of the processes listed in those files are still running when I get to look, so I don’t think they are stuck. |
Beta Was this translation helpful? Give feedback.
-
Hey @clausreinke It appears you are creating your own systemd service for the ./run.sh script, is that correct?
We have a built in way to run as a service, which uses systemd but sets the configuration in the runner we need to properly autoupdate. I’ve confirmed I’m seeing this issue on CentOS 7 when manually creating a systemd service to run You can see more information on how to run as a service here: |
Beta Was this translation helpful? Give feedback.
-
Hi @thboop , Correct. When I installed the runner, I opened all documentation links for self-hosted runners and I do not recall the section on “Configuring the self-hosted runner application as a service” being there at the time?-) I have now replaced our old service with yours, and things are working again - the update seems to have gone through, and jobs are running. Three more suggestions wrt linux runner services:
Thanks for your help (and for actions in general;-), Claus |
Beta Was this translation helpful? Give feedback.
-
Glad to hear it is working for you! For anyone who discovers this topic in the future:
I’ll be taking this information and the other feedback items you have provided to the team to see how we can best address it. Thanks for your contributions and feedback @clausreinke ! |
Beta Was this translation helpful? Give feedback.
-
Hi, I am running into the same error as above but I am using the scripts github provides. When running
I am getting the following output/errors:
(note, I’ve replaced my name and repo with <my-name>-<my-repo> above. Dev_Linux is my machine name) I am new to linux so I don’t know if this is some issue that I have created or not. Everything was going swimmingly (i.e. I can host the runner by running “sudo ./svc.sh start” and run workflows) but now I’m stuck getting this up as a service. |
Beta Was this translation helpful? Give feedback.
-
I am also getting the same error the original posted described, even after using the svc.sh script provided to install/run the runner as a service on a centos 7 (3.10.0-1127.18.2.el7.x86_64) install. Sorry - it turns out there was an error in the labels for the runs-on: element :-(. Thank you! |
Beta Was this translation helpful? Give feedback.
Hey @clausreinke
It appears you are creating your own systemd service for the ./run.sh script, is that correct?
We have a built in way to run as a service, which uses systemd but sets the configuration in the runner we need to properly autoupdate.
I’ve confirmed I’m seeing this issue on CentOS 7 when manually creating a systemd service to run
run.sh
, but the issue does not appear when using the service script provided with the runner. Your issue should be resolved by running as a service using the provided script.You can see more information on how to run as a service here:
https://help.github.com/en/actions/aut…