Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd unavailable in equinix-2cpu-8gb #25

Closed
stianst opened this issue Oct 29, 2024 · 5 comments
Closed

zstd unavailable in equinix-2cpu-8gb #25

stianst opened this issue Oct 29, 2024 · 5 comments
Assignees

Comments

@stianst
Copy link
Contributor

stianst commented Oct 29, 2024

I sent a PR to include zstd in the runner image, which was merged 4 days, but zstd is not available in the equinix-2cpu-8gb today.

Not sure if this means it uses a different image, or the images haven't been updated?

@RobertKielty RobertKielty self-assigned this Nov 19, 2024
@RobertKielty
Copy link
Contributor

RobertKielty commented Nov 19, 2024

The image has been updated and zstd has been installed.

When I pull the image and get to a prompt I can run zstd.

We need to look at how the tar command finds the zstd compression binary. I'll take a look.

@RobertKielty
Copy link
Contributor

From running the runner locally this is what I see

docker run --rm -it --entrypoint bash ghcr.io/cncf/external-gha-runner:main 
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

runner@56d40521a5df:~$ zstd --version 
*** zstd command line interface 64-bits v1.4.8, by Yann Collet ***
runner@56d40521a5df:~$ 

@stianst I will look for the Action where tar is using zstd and failing (I was looking at this this morning) and troubleshoot this further.

@RobertKielty
Copy link
Contributor

Here's the failing line

https://github.com/cncf/keycloak-testing/actions/runs/11890957483/job/33131050815#step:3:16722

From the env vars and the bash being invoked without a profile it looks like the PATH is not set.

Run tar -C ~/ --use-compress-program zstd -cf m2-keycloak.tzts \
  tar -C ~/ --use-compress-program zstd -cf m2-keycloak.tzts \
  --exclude '*.tar.gz' \
  .m2/repository/org/keycloak
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    MAVEN_ARGS: -B -nsu -Daether.connector.http.connectionMaxTtl=25
    SUREFIRE_RERUN_FAILING_COUNT: 2
    SUREFIRE_RETRY: -Dsurefire.rerunFailingTestsCount=2
    JAVA_HOME: /home/runner/_work/_tool/Java_Temurin-Hotspot_jdk/21.0.5-11.0.LTS/x64
    JAVA_HOME_21_X64: /home/runner/_work/_tool/Java_Temurin-Hotspot_jdk/21.0.5-11.0.LTS/x64
/bin/sh: 1: zstd: not found

Try replacing

tar -C ~/ --use-compress-program zstd

with

tar -C ~/ --use-compress-program /usr/bin/zstd

@stianst
Copy link
Contributor Author

stianst commented Nov 20, 2024

We can look into if we can change to use the full path in our workloads without causing issues on standard GitHub runners or elsewhere, but it's still a bit strange that it is not on the PATH, as I would expect /usr/bin to be on the PATH by default on a Linux based container.

@RobertKielty
Copy link
Contributor

RobertKielty commented Nov 20, 2024

@stianst That's great!

You can also choose to run /usr/bin/bash without the --noprofile --norc flags.

That would also allow bash to read configuration files and configure the PATH according to your (reasonable) expectations. Excluding consumption of standard bash profile and rc files across /etc and home directories is why PATH is not setup.

When figuring this stuff out you can always run

docker run --rm -it --entrypoint bash ghcr.io/cncf/external-gha-runner:main

to interactively see how the runner is configured and behaves.

 ~  cncf >> .github > actions > status-check  $ docker run --rm -it --entrypoint bash ghcr.io/cncf/external-gha-runner:main
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

runner@e440504bbe79:~$ env | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
runner@e440504bbe79:~$ bash
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

runner@e440504bbe79:~$ env |
> grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
runner@e440504bbe79:~$ zstd 
stdin is a console, aborting
runner@e440504bbe79:~$ zstd  --version 
*** zstd command line interface 64-bits v1.4.8, by Yann Collet ***
runner@e440504bbe79:~$ exit 
exit
runner@e440504bbe79:~$ zstd 
stdin is a console, aborting
runner@e440504bbe79:~$ zstd --version 
*** zstd command line interface 64-bits v1.4.8, by Yann Collet ***
runner@e440504bbe79:~$ 

If you can share with me the source of the tar command I can troubleshoot this further for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants