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

Latest release regresses OCI layout support #1974

Open
mattmoor opened this issue Mar 9, 2022 · 7 comments
Open

Latest release regresses OCI layout support #1974

mattmoor opened this issue Mar 9, 2022 · 7 comments

Comments

@mattmoor
Copy link
Collaborator

mattmoor commented Mar 9, 2022

Actual behavior

With the latest release (last night), some of our e2e tests fail with:

INFO[0000] CMD ["echo Hello World"]                     
INFO[0001] Skipping push to container registry due to --no-push flag 

Error: open /var/run/oci/layout/blobs/sha256/c6f4d1a13b699c8490910fd4fd6c7056b90fd0da3077e4f29b4bd27bf0bae6cd: permission denied

Expected behavior

This passed with :latest prior to the v1.8.0 cut, which according to @imjasonh was v1.6.0.

To Reproduce

These are the two relevant steps of the Tekton task whose output you see above:

    - name: build-as-layout
      image: gcr.io/kaniko-project/executor:latest
      args:
      - --dockerfile=/workspace/$(params.path)/$(params.dockerfile)
      - --context=/workspace
      - --no-push # We are writing a layout
      - --oci-layout-path=/var/run/oci/layout
      - --digest-file=/tekton/results/dev.mink.images.digest
      - $(params.kaniko-args)
      volumeMounts:
      - name: oci-layout
        mountPath: /var/run/oci/layout

    - name: push-layout
      image: gcr.io/go-containerregistry/krane:latest
      args: ["push", "--image-refs=/tekton/results/IMAGES", "/var/run/oci/layout", "$(params['dev.mink.images.target'])"]
      volumeMounts:
      - name: oci-layout
        mountPath: /var/run/oci/layout

Here krane used to be able to read the layout and publish it (it is :nonroot), but something about the latest release is causing the permission denied error above.

Pinning to v1.7.0 "fixed" this for us, which narrows the window of regression to sometime in v1.8.0.

Additional Information

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
@mattmoor
Copy link
Collaborator Author

mattmoor commented Mar 9, 2022

cc @priyawadhwa @tejal29

@imjasonh
Copy link
Collaborator

imjasonh commented Mar 9, 2022

@thomas-tacquet
Copy link

By switching from 1.7.0 to 1.8.0 I got the same behaviour but I'm not sure it has something to do with OCI, it's more general (worse)

I just push my built image on my destination (private container registry) and it keeps failing. Reverted to 1.7.0 and everything is fine.

if it can help troublehsooting, here are my kaniko args :

        - "--use-new-run"
        - "--cache=true" 
        - "--cache-dir=/XXX" 
        - "--snapshotMode=redo"
        - "--dockerfile=MYDOCKERFILE"
        - "--destination=MYREGISTRY"

error : error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "PRIVATE_REGISTRY"

@robertlestak
Copy link

Confirming we saw the same (error checking push permissions) with :latest, pinning to :1.7.0 "fixed" it.

@imjasonh
Copy link
Collaborator

"error checking push permissions" issue are not related to the originally reported bug (which doesn't involve pushing at all, FWIW).

@BernhardGruen
Copy link

Did someone test if this regression is solved with v1.8.1?

@thomas-tacquet
Copy link

Tested in v1.8.1 and I still have the same problems, investigating.

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

No branches or pull requests

7 participants