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

[BUG] Buildah not running as root on self hosted runners #125

Open
omer2500 opened this issue Aug 29, 2023 · 3 comments
Open

[BUG] Buildah not running as root on self hosted runners #125

omer2500 opened this issue Aug 29, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@omer2500
Copy link

omer2500 commented Aug 29, 2023

Version

redhat-actions/buildah-build@v2

Describe the bug

When using self hosted runner that runs ubuntu 22.04 the default user is "runner" instead of root
this causes errors related to permission to some folders and files.
although we have option to run as root user but its only when you use sudo command which is not possible with this action

for example:

Error processing tar file(exit status 1): potentially insufficient UIDs or GIDs available in user namespace (requested 0:50 for /var/local): Check /etc/subuid and /etc/subgid: lchown /var/local: invalid argument
time="2023-08-28T19:49:27Z" level=error msg="exit status 125"

and

time="2023-08-28T19:49:26Z" level=warning msg="error running newgidmap: exit status 1: newgidmap: write to gid_map failed: Operation not permitted\n"
time="2023-08-28T19:49:26Z" level=warning msg="falling back to single mapping"
time="2023-08-28T19:49:26Z" level=warning msg="error running newuidmap: exit status 1: newuidmap: write to uid_map failed: Operation not permitted\n"
time="2023-08-28T19:49:26Z" level=warning msg="falling back to single mapping"

When i run the buildah command with sudo (not part of the action)
everything is working

sudo /usr/bin/buildah bud .....

Steps to reproduce, workflow links, screenshots

Use ARC (actions controller runner) with the runner image: "summerwind/actions-runner:ubuntu-22.04"

@omer2500 omer2500 added the bug Something isn't working label Aug 29, 2023
@omer2500
Copy link
Author

#126

@joerg
Copy link

joerg commented Nov 28, 2023

I have the exact same problem right now and it took ma almost a day to find this issue. Thanks a lot and I hope the PR will be merged soon.

@omer2500
Copy link
Author

I have the exact same problem right now and it took ma almost a day to find this issue. Thanks a lot and I hope the PR will be merged soon.

Hi! @joerg
if it relevant to you
we ended up doing a workaround,
we are using the cli of buildah and podman directly

floating-cat added a commit to floating-cat/wechat-in-docker that referenced this issue Feb 13, 2024
floating-cat added a commit to floating-cat/wechat-in-docker that referenced this issue Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants