redhat-developer / podman-desktop-sandbox-ext

OpenShift Sandbox integration for podman desktop
Apache License 2.0
2 stars 5 forks source link

An error occurred while pushing the image httpd-24 to Developer Sandbox cluster - Error: (HTTP code 500) server error - [object Object] #122

Open odockal opened 2 months ago

odockal commented 2 months ago

If I try to push some of the images I have locally (some from registry.redhat.io, some other from publicly accessible sources like registry.access.redhat.com), there is an error from dev sandbox.

An error occurred while pushing the image 'registry.access.redhat.com/ubi8/httpd-24:latest' to Developer Sandbox cluster 'dev-sandbox-context'. Error: (HTTP code 500) server error - [object Object]

Some image can be pushed:

docker.io/library/httpd:latest
quay.io/odockal/alpine-local
docker.io/library/alpine

Others cannot:

registry.redhat.io/rhel8/nginx-122:latest
registry.redhat.io/ubi8/httpd-24:latest
registry.access.redhat.com/ubi8/httpd-24:latest

See https://github.com/apocas/docker-modem/issues/171 issue about [object Object] in error message.

dgolovin commented 2 months ago

Most likely yhe image is signed and you have to add option to push command to remove signature. The criptic error is on docker-modem side, they don't capture the error property of the exception. I have issue opened there with pull request.

Try to push from cli and you will see actual error.

dgolovin commented 2 months ago
podman push default-route-openshift-image-registry.apps.sandbox-m3.1530.p1.openshiftapps.com/nivologd-dev/httpd-24
Getting image source signatures
Checking if image destination supports signatures
Error: Copying this image would require changing layer representation, which we cannot do: "Would invalidate signatures"
odockal commented 2 months ago

@dgolovin Ok, so we need to let user know and also offer a way how to do it?

dgolovin commented 2 months ago

This message is coming from docker-modem see (https://github.com/apocas/docker-modem/issues/171). Until it is fixed, we cannot even detect the error and let user know what to do.

odockal commented 2 months ago

@dgolovin ah, alright. thanks for explanation, let's keep the issue opened then until the fix is at place.

odockal commented 2 months ago

@dgolovin So I tried to override the signatures locally, to have a workaround, but I am missing an authentication:

podman push default-route-openshift-image-registry.apps.sandbox-m3.1530.p1.openshiftapps.com/odockal-dev/httpd-24 --remove-signatures
Error: trying to reuse blob sha256:ba181bba861a60bb8f268a6efe89e6421b78b3cfb8113585e2a4ebab6bc57f63 at destination: checking whether a blob sha256:ba181bba861a60bb8f268a6efe89e6421b78b3cfb8113585e2a4ebab6bc57f63 exists in default-route-openshift-image-registry.apps.sandbox-m3.1530.p1.openshiftapps.com/odockal-dev/httpd-24: authentication required
dgolovin commented 2 months ago

yes, to do it manually, you have to add registry default-route-openshift-image-registry.apps.sandbox-m3.1530.p1.openshiftapps.com/odockal-dev/httpd-24 using any user name and the same token used in sandbox connection.

dgolovin commented 2 months ago

@odockal another option is to use 'podman push' instead of dockerode when https://github.com/containers/podman-desktop/issues/5990 is fixed. Detect the error and request user confirmation to use --remove-signatures option when pushing.