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

Give a pointer to solution if bubblewrap runner cannot use user namespace #1628

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

smoser
Copy link
Contributor

@smoser smoser commented Nov 8, 2024

Users of melange on ubuntu will have issues on their first attempt to use melange as a result of 24.04 changes to availability of user namespaces.

Before this change is applied, an attempt to 'make package/foo' in wolfi-dev/os would result in error messages like this:

bwrap: setting up uid map: Permission denied
ERROR: failed to build package. the build environment has been preserved:
  workspace dir: /tmp/melange-workspace-4104388352
  guest dir: /tmp/melange-guest-1722197694
failed to build package: unable to start pod: exit status 1

It doesn't give the user much info on how to fix.
This change turns that failure to look like:

ERRO failed to build package: unable to start pod: Unable to execute 'bwrap --unshare-user true'.
Command failed with:
  bwrap: setting up uid map: Permission denied

See https://github.com/chainguard-dev/melange/issues/1508 for fix

See #1508

@smoser smoser changed the title Give a pointer to solution if bubblewrap runner cannot use user names… Give a pointer to solution if bubblewrap runner cannot use user namespace Nov 8, 2024
@smoser smoser force-pushed the fix/bwrap-user-ns-better-error branch from b796b80 to b2094e1 Compare November 8, 2024 21:19
…pace.

Users of melange on ubuntu will have issues on their first attempt
to use melange as a result of 24.04 changes to availability of
user namespaces.

See chainguard-dev#1508 for more
information.

Before this change is applied, an attempt to 'make package/foo' in
wolfi-dev/os would result in error messages like this:

    bwrap: setting up uid map: Permission denied
    ERROR: failed to build package. the build environment has been preserved:
      workspace dir: /tmp/melange-workspace-4104388352
      guest dir: /tmp/melange-guest-1722197694
    failed to build package: unable to start pod: exit status 1

It doesn't give the user much info on how to fix.
This change turns that failure to look like:

    ERRO failed to build package: unable to start pod: Unable to execute 'bwrap --unshare-user true'.
    Command failed with:
      bwrap: setting up uid map: Permission denied

    See chainguard-dev#1508 for fix

Signed-off-by: Scott Moser <smoser@brickies.net>
@smoser smoser force-pushed the fix/bwrap-user-ns-better-error branch from b2094e1 to a839ca1 Compare November 11, 2024 18:52
@smoser smoser merged commit e03cdc4 into chainguard-dev:main Nov 12, 2024
36 checks passed
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

Successfully merging this pull request may close these issues.

2 participants