ec2-github-runner icon indicating copy to clipboard operation
ec2-github-runner copied to clipboard

Runners fail to register when IPs/hostnames are reused

Open jeverling opened this issue 3 years ago • 5 comments

It seems that Github runners use the hostname as runner --name by default. This lead to runner instances not being able to register for us, because AWS was re-using internal IP addresses. Setting runner --name explicitly to a unique value should fix this.

jeverling avatar Dec 08 '22 13:12 jeverling

@jeverling I'm curious as to how this happened. Even if AWS was reusing internal IP addresses, and EC2 host names are based on it's private IP address, it can only cause two different EC2 hosts at different points in time to have the same host name. If that is the case, what's the problem here? Does GitHub expect new names every time a runner registers to GitHub and not reuse any old names used by old runners that don't exist anymore?

karuppiah7890 avatar Aug 08 '23 07:08 karuppiah7890

Does GitHub expect new names every time a runner registers to GitHub and not reuse any old names used by old runners that don't exist anymore?

Exactly, Github keeps a registry of runners, and refuses registering a runner with a name that has been used before. It might be possible to deregister runners or solve this in other ways, but I think using unique names for runners isn't a bad solution to this problem.

jeverling avatar Aug 08 '23 14:08 jeverling

yeah, deregistering is a good way to solve the problem

karuppiah7890 avatar Aug 09 '23 13:08 karuppiah7890

Unique name is good in general 👍 I'm gonna use your solution for unique name

karuppiah7890 avatar Aug 09 '23 13:08 karuppiah7890