podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

pods page take forever to update

Open axel7083 opened this issue 1 year ago • 1 comments

Bug description

When I create a pod from the containers page, it may takes 30s up to a minute to be displayed in the pods page, but in the containers page it is instantaneous

https://github.com/user-attachments/assets/69c06388-6fe1-41d1-812e-b92c3b48cf9e

Deleting them from the containers page is also instantaneous but takes forever on the pods page, even ghost resources at some point

https://github.com/user-attachments/assets/ac82f8ab-4b63-4a22-9a66-5bee6678deda

Operating system

Windows 11

Installation Method

None

Version

next (development version)

Steps to reproduce

  1. create pod from nginx container podman run -d nginx
  2. assert pods not listed directly on the pods page

Relevant log output

Not much in the logs

Additional context

  • I restarted podman-desktop: same result
  • I restarted my podman machine: same result

axel7083 avatar Oct 21 '24 14:10 axel7083

I haven't hit this issue, but I did see some lagginess last week while comparing to other kube objects, and I have a feeling this might be because pods page (kube client) was never updated to use the informers.

deboer-tim avatar Oct 21 '24 15:10 deboer-tim

https://github.com/user-attachments/assets/6ad452be-d03d-42c9-aab6-c0eeade34fa6

I'm experiencing this issue as well with a general lagginess when trying to delete / restart / etc.

cdrage avatar Oct 29 '24 16:10 cdrage

@deboer-tim Since it seems that you have a patch ready (might be incomplete?), I have assigned you to the issue and added it to the actual sprint. Feel free to update anything that does not seems right.

odockal avatar Nov 04 '24 08:11 odockal

The text I added was 'possibly needed to fix #9502' and unfortunately Github views that as 'fixes'. I've changed the text in the PR, and am unassigning myself as I am not directly intending to fix this issue.

There is a short term fix possible, but IMHO the better solution is to completely separate Podman pods from Kubernetes pods, using the same informer code paths as we do for all other Kube resources instead of having special cases/code paths for pods.

deboer-tim avatar Nov 12 '24 16:11 deboer-tim

I noticed this behavior: After deploying a pod to a Kubernetes cluster, the Pods component page does not automatically refresh and you would not be able to see the newly created pod. I was able to see the newly created pod after using this manual approach:

  • Switch to another Kube context and then switch back to the original context. After doing this, you can view the Pods component page in an up-to-date state.

shipsing avatar Nov 18 '24 06:11 shipsing

Probably the same problem described in this issue #10356.

dgolovin avatar Dec 21 '24 06:12 dgolovin

High CPU/memory could possibly also cause this behaviour or #10356 could be another case of this, but the core issue here is that we use informers for everything else but not for pods. I did some investigation a while ago and could reproduce easily with low CPU/memory use, switching pods to informers fixed this.

deboer-tim avatar Dec 21 '24 20:12 deboer-tim

This page is the only place using Kubernetes watchers, and would get out of sync vs the informers used everywhere else.

This will be fixed by avoiding the issue :) and keeping a clear separation. We'll remove Kubernetes pods from this page (will only show Podman pods here) and will only showing Kubernetes pods in the Kubernetes > Pods page.

We'll be using #8819 to do the work, so I am closing this as a duplicate.

deboer-tim avatar Feb 20 '25 22:02 deboer-tim