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

Download failures of container image not shown #914

Closed
gbraad opened this issue Feb 9, 2022 · 9 comments · Fixed by #915
Closed

Download failures of container image not shown #914

gbraad opened this issue Feb 9, 2022 · 9 comments · Fixed by #915
Labels
bug Something isn't working

Comments

@gbraad
Copy link

gbraad commented Feb 9, 2022

We are hosting the podman view as a frame, and therefore do not have the shell available to us. This might be the problem, but when ewe download an image that is not actually available for the target #913 we aren't informed of a failure.

Originally posted by @gbraad in crc-org/tray-electron#135 (comment)

@jelly
Copy link
Member

jelly commented Feb 9, 2022

What do you mean with frame and shell? I think the notifications are drawn inside cockpit-podman so not something cockpit itself provides.

No shell means http://${podmanHost}:9090/cockpit/@localhost/podman/index.html

@gbraad
Copy link
Author

gbraad commented Feb 9, 2022

We open a single module as the cockpit-desktop *1 *2 would do

http://${podmanHost}:9090/cockpit/@localhost/podman/index.html

https://github.com/code-ready/tray-electron/blob/057a3bae9f1d9a8ebb2fe01adc72e74bfb254549/main.js#L847

This means we do not host shell with the navigation, etc

no shell => https://github.com/cockpit-project/cockpit/tree/main/pkg/shell

@jelly
Copy link
Member

jelly commented Feb 9, 2022

Just setup my RPI with Fedora server, creating a new container and selecting archlinux which has no AARCH64 image and it is indeed stuck at showing "Downloading".

podman ps and podman ps -a shows nothing. Ideally we would filter valid images up front but I'm afraid we lack the information to do so.

image

[jelle@fedora ~]$ podman pull archlinux
✔ docker.io/library/archlinux:latest
Trying to pull docker.io/library/archlinux:latest...
Error: choosing an image from manifest list docker://archlinux:latest: no image found in manifest list for architecture arm64, variant "v8", OS linux
[jelle@fedora ~]$ 
[jelle@fedora ~]$ curl -X POST -s -g --no-buffer --unix-socket /run/user/1000/podman/podman.sock 'http://localhost/v1.12/libpod/images/pull?reference=docker.io/archlinux'
{"stream":"Trying to pull docker.io/library/archlinux:latest...\n"}
{"error":"choosing an image from manifest list docker://archlinux:latest: no image found in manifest list for architecture arm64, variant \"v8\", OS linux"}

There is an error shown which we don't handle.

jelly added a commit to jelly/cockpit-podman that referenced this issue Feb 10, 2022
In 7b29541 we introduced the 'pull latest image' option which changed
the onDownloadContainerFinished function but the pullImage's catch
wasn't updated. Causing the download to stay forever when it fails and
no error message being shown.

Closes cockpit-project#914
martinpitt pushed a commit that referenced this issue Feb 11, 2022
In 7b29541 we introduced the 'pull latest image' option which changed
the onDownloadContainerFinished function but the pullImage's catch
wasn't updated. Causing the download to stay forever when it fails and
no error message being shown.

Closes #914
@gbraad
Copy link
Author

gbraad commented Feb 11, 2022

In this case, will the download now show an error or just 'finish' downloading?

@jelly
Copy link
Member

jelly commented Feb 11, 2022

In this case, will the download now show an error or just 'finish' downloading?

It does, but hmm this is something we should improve!

image

@jelly
Copy link
Member

jelly commented Feb 11, 2022

As podman doesn't give error codes, this is the best we can do:

image

Fixed in #916 should be in the release next week.

@gbraad
Copy link
Author

gbraad commented Feb 11, 2022

OK, better than nothing. But very UI unfriendly

@jelly
Copy link
Member

jelly commented Feb 11, 2022

OK, better than nothing. But very UI unfriendly

I agree, I hope podman can implement optional filtering of architecture then we can use that in cockpit-podman

@vrothberg
Copy link

Note that I currently do not have time to implement it but the summary here should give a good starting point on what needs to be done. Again the warning that such client-side filtering can be very slow/expensive. Unfortunately, the search endpoints on registries do not support such filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants