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

Add user configuration to buildah container image #4674

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nolange
Copy link

@nolange nolange commented Mar 20, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

The container has configuration for root,
this commit adds a similar configuration for the build user.

Closes: #4669

How to verify it

The commands displaying the configuration

podman run --rm quay.io/containers/buildah buildah info
podman run --rm --user build quay.io/containers/buildah buildah info

should both contain:

"GraphDriverName": "overlay",
    "GraphOptions": [
        "overlay.imagestore=/var/lib/shared",
        "overlay.mount_program=/usr/bin/fuse-overlayfs",
        "overlay.mountopt=nodev,fsync=0"
    ]

Which issue(s) this PR fixes:

Fixes #4669

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

The container has configuration for root,
this commit adds a similar configuration for the build user.

Closes: containers#4669

Signed-off-by: Norbert Lange <[email protected]>
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 20, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 20, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nolange
Once this PR has been reviewed and has the lgtm label, please assign cevich for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Mar 30, 2023

A lot of these settings are builtin to buildah and not needed.

You can also copy directly your storage.conf file into its final destination, as long as you wait for the build user to be added, I don't know why you are using the /tmp directory.

You are forcing the system to always use fuse-overlay, which is not always necessary for rootless containers and requires the /dev/fuse device to be added to the container.

@giuseppe PTAL

@giuseppe
Copy link
Member

I agree we should not change the default, fuse-overlayfs must be a fallback when the native driver cannot be used

@nolange
Copy link
Author

nolange commented Mar 30, 2023

A lot of these settings are builtin to buildah and not needed.

See #4669, it fixes a real problem for me.

You can also copy directly your storage.conf file into its final destination, as long as you wait for the build user to be added, I don't know why you are using the /tmp directory.

Cause then I would need another step to fixup owner and permissions

You are forcing the system to always use fuse-overlay, which is not always necessary for rootless containers and requires the /dev/fuse device to be added to the container.

Its done the same way for the root user? Why is this only an argument for rootless?

I would prefer to be able to use the container as-is, so if changing the build user configuration is a no-go, is adding a build_fuse user a viable path?

@rhatdan
Copy link
Member

rhatdan commented Apr 5, 2023

I have updated the buildah image to not use fuse-overlayfs in rootful mode? Does this help fix your problem?

@nolange
Copy link
Author

nolange commented Apr 5, 2023

I have updated the buildah image to not use fuse-overlayfs in rootful mode? Does this help fix your problem?

Dont have the ability to check this week, but my guess is that now both root and non-root mode will not work.

@rhatdan
Copy link
Member

rhatdan commented Apr 5, 2023

I think we need to diagnose that.

@github-actions
Copy link

github-actions bot commented May 6, 2023

A friendly reminder that this PR had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. stale-pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

containers/buildah image misses settings for build user
3 participants