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

non-root opm fails when a layer contains a file owned by root #339

Closed
mprahl opened this issue May 27, 2020 · 1 comment
Closed

non-root opm fails when a layer contains a file owned by root #339

mprahl opened this issue May 27, 2020 · 1 comment

Comments

@mprahl
Copy link

mprahl commented May 27, 2020

The following command fails when running as a non-root user:
opm index add --generate --bundles registry-proxy-stage.engineering.redhat.com:443/rh-osbs-stage/e2e-e2e-test-rhel8-operator@sha256:6a525f684641298088ced4a7df91a7937d00a433cc5ddf404d6409bc5e2d9b89 --binary-image registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry@sha256:ed2481437d9713fc49d76d101ee0b5bd5f6b53a3e8b440ae3551563aea4ff2bf --from-index registry-proxy-stage.engineering.redhat.com/rh-osbs-stage/iib:985.

This fails with:

INFO[0029] unpacking layer: {application/vnd.docker.image.rootfs.diff.tar.gzip sha256:5b8ca0a26d14dc05be7ace7233b529d56c3f42f0e994b01293ffe6b310df375f 80467927 [] map[] <nil>}  bundles="[registry-proxy-stage.engineering.redhat.com:443/rh-osbs-stage/e2e-e2e-test-rhel8-operator@sha256:6a525f684641298088ced4a7df91a7937d00a433cc5ddf404d6409bc5e2d9b89]"
Error: open index_tmp_731416721/root/.bash_logout: permission denied

If I run the same command as root, it is successful. Additionally, if I run the same command using podman v1.9.2 as shown here, it works just fine:

opm index add --generate --bundles registry-proxy-stage.engineering.redhat.com:443/rh-osbs-stage/e2e-e2e-test-rhel8-operator@sha256:6a525f684641298088ced4a7df91a7937d00a433cc5ddf404d6409bc5e2d9b89 --binary-image registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry@sha256:ed2481437d9713fc49d76d101ee0b5bd5f6b53a3e8b440ae3551563aea4ff2bf --from-index registry-proxy-stage.engineering.redhat.com/rh-osbs-stage/iib:985 --container-tool podman

Using podman would be a suitable workaround if podman v1.9.2 was released for RHEL 8, but the latest is 1.6.4 and that version does not have the following feature which is required containers/podman#5234 for using digests instead of tags.

By the way, here is the output of opm version:

Version: version.Version{OpmVersion:"", GitCommit:"", BuildDate:"2020-05-13T21:01:13Z", GoOs:"linux", GoArch:"amd64"}
@mprahl
Copy link
Author

mprahl commented May 27, 2020

FYI, I filed a corresponding Bugzilla Bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1840727

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

1 participant