Repository navigation
Closed
Labels
bugSomething isn't workinggha-runner-scale-setRelated to the gha-runner-scale-set modeneeds triageRequires review from the maintainers
Description
Checks
- I've already read https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/troubleshooting-actions-runner-controller-errors and I'm sure my issue is not covered in the troubleshooting guide.
- I am using charts that are officially provided
Controller Version
0.8.2
Deployment Method
Helm
Checks
- This isn't a question or user support case (For Q&A and community support, go to Discussions).
- I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
To Reproduce
- Setup ARC system per quickstart:
NAMESPACE="arc-systems"
helm install arc \
--namespace "${NAMESPACE}" \
--create-namespace \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller
kubectl create configmap -n "${NAMESPACE}" self-signed-cert --from-file=self.crt=/usr/local/share/ca-certificates/self.crt
kubectl rollout restart -n "${NAMESPACE}" deployment arc-gha-rs-controller
- Then installed a runner set with this configuration:
githubConfigUrl: https://github.mycompany.com/development/my_repo
template:
spec:
initContainers:
- name: init-dind-externals
image: docker.repositories.mycompany.com/my-custom-runner:latest
command:
["cp", "-r", "-v", "/home/runner/externals/.", "/home/runner/tmpDir/"]
volumeMounts:
- name: dind-externals
mountPath: /home/runner/tmpDir
containers:
- name: runner
image: docker.repositories.mycompany.com/my-custom-runner:latest
command: ["/home/runner/run.sh"]
env:
- name: DOCKER_HOST
value: unix:///run/docker/docker.sock
volumeMounts:
- name: work
mountPath: /home/runner/_work
- name: dind-sock
mountPath: /run/docker
readOnly: true
- name: dind
image: docker.repositories.mycompany.com/docker:dind
args:
- dockerd
- --host=unix:///run/docker/docker.sock
- --group=$(DOCKER_GROUP_GID)
env:
- name: DOCKER_GROUP_GID
value: "123"
securityContext:
privileged: true
volumeMounts:
- name: work
mountPath: /home/runner/_work
- name: dind-sock
mountPath: /run/docker
- name: dind-externals
mountPath: /home/runner/externals
volumes:
- name: work
emptyDir: {}
- name: dind-sock
emptyDir: {}
- name: dind-externals
emptyDir: {}
githubServerTLS:
certificateFrom:
configMapKeyRef:
name: self-signed-cert
key: self.crt
runnerMountPath: /usr/local/share/ca-certificates/And this command:
INSTALLATION_NAME="myrepo-runner-set"
NAMESPACE="arc-runners"
GITHUB_PAT="XXXXXX"
helm upgrade "${INSTALLATION_NAME}" \
--install \
--namespace "${NAMESPACE}" \
--create-namespace \
--set githubConfigSecret.github_token="${GITHUB_PAT}" \
-f runners_values.yaml \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set
kubectl create configmap -n "${NAMESPACE}" selfcert --from-file=self.crt=/usr/local/share/ca-certificates/self.crtI created a custom docker image to add my self-signed cert and a bunch tools:
FROM ghcr.io/actions/actions-runner:latest
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:git-core/ppa \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
git \
iproute2 \
iptables \
jq \
sudo \
uidmap \
unzip \
zip \
fuse-overlayfs \
gpg \
lsb-release \
apt-transport-https \
openssh-client
# Download latest git-lfs version
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
apt-get install -y --no-install-recommends git-lfs
COPY self.crt /usr/local/share/ca-certificates
RUN update-ca-certificates
# Install Terraform
ENV TERRAFORM_VERSION="1.3.7"
ENV VAULT_VERSION="1.15.4"
RUN curl -Lo hashicorp.gpg https://apt.releases.hashicorp.com/gpg && \
apt-key add hashicorp.gpg && \
rm hashicorp.gpg && \
echo "deb https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/hashicorp.list && \
apt-get -y update && \
apt-get -y install terraform${TERRAFORM_VERSION:+=}${TERRAFORM_VERSION} && \
rm -v /etc/apt/sources.list.d/hashicorp.list && \
terraform version
RUN curl -Lo vault.zip https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip && \
unzip vault.zip && \
chmod +x vault && \
mv vault /usr/local/bin/ && \
vault version
# Clean APT cache - put all apt installs before here
RUN rm -rf /var/lib/apt/lists/*
# Install kubectl
ENV KUBECTL_VERSION="v1.26.0"
RUN curl -L -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" &&\
chmod 755 /usr/local/bin/kubectl && \
kubectl version --client=true --short
# Install helm
ENV HELM_VERSION="3.13.3"
RUN curl -L -o helm.tar.gz "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" &&\
tar zxvf helm.tar.gz linux-amd64/helm &&\
mv linux-amd64/helm /usr/local/bin &&\
rmdir linux-amd64 &&\
chmod 755 /usr/local/bin/helm &&\
rm helm.tar.gz && \
helm version
# Install awscli v2
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rfv aws awscliv2.zip && \
aws --version
ENV TERRAGRUNT_VERSION="v0.55.4"
ADD https://github.com/gruntwork-io/terragrunt/releases/download/${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 /tmp
RUN mv /tmp/terragrunt_linux_amd64 /usr/local/bin/terragrunt && \
chmod +x /usr/local/bin/terragrunt && \
terragrunt --version
USER runnerDescribe the bug
The runner starts running the job and while running a go test command shows: Error: Process completed with exit code 130.
Annotations on the job are:
test / test
The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
test / test
The operation was canceled.
test / test
Process completed with exit code 130.
The job should run to completion. Output from the go test command seemed to indicate that tests were passing and there weren't any error messages.
Describe the expected behavior
The job should run to completion, even if go test fails
Additional Context
See steps to reproduceController Logs
https://gist.github.com/jwilkicki/b1b3ec5ae2cad23285f4c40d18070dafRunner Pod Logs
https://gist.github.com/jwilkicki/5a63aa79d2347605e1caa54e1b2e7fc6Metadata
Metadata
Assignees
Labels
bugSomething isn't workinggha-runner-scale-setRelated to the gha-runner-scale-set modeneeds triageRequires review from the maintainers
Activity
github-actions commentedon Feb 21, 2024
Hello! Thank you for filing an issue.
The maintainers will triage your issue shortly.
In the meantime, please take a look at the troubleshooting guide for bug reports.
If this is a feature request, please review our contribution guidelines.
nikola-jokic commentedon Feb 22, 2024
Hey @jwilkicki,
This issue is not related to ARC, since the runner pod started and picked up the job successfully. Because of that, I am going to close this issue. However, to solve your problem, you should probably try to see if memory usage on the node kills the runner pod. Please try setting requests/limits and see if the issue occurs
jwilkicki commentedon Feb 22, 2024
I have metrics server installed and was watching k top nodes and I didn't see any resource exhaustion. It looks like something thinks the job can be cancelled because it became unregistered even though it is still running.
nikola-jokic commentedon Feb 22, 2024
The runner log only shows the symlinks. Based on the log, it seems like the runner doesn't even have a chance to start. Can you please check if the runner starts and maybe update the log so I can look into it? I still feel like this is not ARC issue, but I can provide some pointers that may help you resolve it☺️
jwilkicki commentedon Feb 22, 2024
I would definitely welcome some pointers. As far as I can tell, the pod is running. My job looks normal in the Github Actions UI and my job is not failing at the very first steps; it process a bunch of them until it gets to my actual unit tests.
I'm re-running my job right now while running
watch kubectl top nodes. I'll keep watching resource usage through to failure to see if I'm exhausting anything. Then I'll see if I can get some clearer logs.jwilkicki commentedon Feb 22, 2024
So, I watched the node usage and the logs. CPU usage on my node got to 103% but memory seemed to peak around 60-ish%. The pod still seemed to be running and then it got a "user cancelled" message and started winding down. See this gist: https://gist.github.com/jwilkicki/a321880180027dfbdb897e207e8caa0c around line 70 and beyond. My
go testreturned exit code 130, which seems to indicate that it got a SIGINT signal rather than failing because of a test failure.jwilkicki commentedon Feb 22, 2024
There seemed to be a lot of expected logging in the job, so I didn't include all of it. Basically, a bunch of messages that web console lines were being reported back to Github. I tried to just include where things started to go wrong.
nikola-jokic commentedon Feb 22, 2024
Can you please try setting requests and limits? And can you please try executing action without running your go tests? If you can execute a simple action, that would indicate the resource problem. The runner receives SIGINT, so maybe, you can see if the pod gets evicted?
jwilkicki commentedon Feb 22, 2024
Sure, I can try that. While waiting for your suggestion, I tried switching my EKS cluster to larger nodes and I'm still hitting 103% of CPU at times. That run ended with: "Error: The operation was canceled." in the Github UI. It looks like the pod terminated after that and I have no pods running in arc-runners right now.
I can change the workflow to just do a simple echo, but I do have a bunch of steps that do things like dump the output of
docker infoand those are running just fine before I get to the tests.Do you have a rule of thumb for what I should set the requests and limits for?
jwilkicki commentedon Feb 22, 2024
I added in CPU and Memory limits and then used
kubectl events --forto watch for events and I think I found it: the pod was evicted for the dind container using too much ephemeral storage:I'll have to see how to get more storage allocated.
jwilkicki commentedon Feb 22, 2024
Allocating more disk to my EKS nodes seems to have solved the problem. What was ultimately helpful was watching events for the runner pod, which showed the eviction for disk space usage.
Thank your for the suggestion!
emmahsax commentedon Feb 28, 2024
@jwilkicki How did you add more disk to your EKS nodes? I'm not sure how to add more ephemeral storage (or attach another PVC and storage unit).
jwilkicki commentedon Mar 4, 2024
@emmahsax Sorry for the late reply. I'm using Terraform to provision my nodes and there is a disk size parameter for the eks managed nodes. I believe this ends up going into a launch template for the autoscaling group. I think you can do it with PVC, etc. as you suggested but that seemed like a lot of effort. In my case, we have an EKS cluster dedicated for runners so I just made the actual nodes have additional disk space.
noamgreen commentedon Oct 12, 2024
@nikola-jokic HI
@jwilkicki
This issues is not solve i am not sure why this happened , i can tell you i see it in EKS + karpenter
but its not 100% related to EKS its the way the host are working in karpenter
need to set "NodePool"
but its solve part of the issues , i think you have some CPU usage as in EKS you cant over the limit so the controller will
SIG the node and terminated this is why you dont see any error
i can tell you 2.319.x and 2.320.x have this issues and i am sure its come from the dotnet .
cant tell you if we upgrade this will be solved but i think this issues is need to be fixed
in my last test i am using the docker "ghcr.io/actions/actions-runner:2.320.0"
Thanks