cockpit-project / cockpit-podman

Cockpit UI for podman containers
GNU Lesser General Public License v2.1
432 stars 88 forks source link

Pod disappears when stopped #1805

Open ozboss opened 1 month ago

ozboss commented 1 month ago

Cockpit version: 321-1 Cockpit-podman version: 91-1 Podman version: 5.0.3 OS: Debian (unstable)

I created a pod with quadlets and it shows up fine in Cockpit. But when I stop the pod it disappears from the interface. When I want to start it again I have to go into Services and look for the pod service and start it from here. It then shows up in the interface again.

EDIT: I just checked and it also disappears from "podman pod list", which is probably the reason it also disappears from the interface. Seems like this is intended behavior... Is there still something you would be able or willing to do about it regarding the cockpit interface?

jelly commented 1 month ago

If podman also does not know about it, then I feel that we also shouldn't jump through hoops to support this use case. Which is a bit sad as quadlets are nice but as they are usually started via systemd so it makes sense that the service management happens there.

garrett commented 1 month ago

Ideally, Cockpit would have some idea of quadlets, so it could do cross-linking between the Services page and the Podman containers page (assuming this information is available) and also show quadlets in Cockpit Podman too as you suggest. As Jelle indicates, that would probably require Podman to be aware of it too, meaning that they'd probably have to add the feature before we do. All of this would also require some feature work in Cockpit and is not currently in our roadmap, but I agree that it would be nice to have.

At least for the time being, consider containers that are made from quadlets as being system services that Just happen to be a container as an "implementation detail", and the fact that you can see and inspect them when running in Cockpit Podman as a nice bonus.

ozboss commented 1 month ago

Yes I agree with both of you and it would probably mean a lot of work to cross-link the services and probably that's not even desirable. This podman issue currently has an ongoing discussion about the problem and one of the developers sums it up quite nicely:

The problem is we would need to convert quadlets to a start/stop mode rather then just use of run.

There are also some suggestions on how this could be handled by adjusting the service file.

For the time being I'm just poking around with Podman and do not have any special requirement for this. So feel free to close this issue if you feel there is nothing to be done about it.