xpipe-io / xpipe

Your entire server infrastructure at your fingertips
https://xpipe.io
Apache License 2.0
3.06k stars 82 forks source link

Podman connector not recognizing running containers #277

Closed coandco closed 3 months ago

coandco commented 3 months ago

I just added an autodiscovered podman connector on a box with several podman containers running, as verified by this command I typed into the console for the connection:

$ podman ps
CONTAINER ID  IMAGE                                                          COMMAND               CREATED        STATUS            PORTS   NAMES
bf77b1ba9d98  <censored>:5050/populi/shardnado:2may23_v2           /etc/shardnado/sh...  13 months ago  Up 13 months ago          systemd-shardnado
f37cdf56cb64  <censored>:5050/populi/converter:prod-20240131-3     /usr/bin/python3 ...  3 months ago   Up 3 months ago           systemd-converter
458f0ff9cc2c  <censored>:5050/populi/converter-ng:prod-20240301-4  /usr/bin/python3 ...  3 months ago   Up 3 months ago           systemd-converter-ng
b66c84e59fd6  <censored>:5050/populi/pushitpy:prod-20231024-1      /usr/bin/python3 ...  3 months ago   Up 3 months ago           systemd-pushitpy
d948f9217aec  <censored>:5050/populi/postmanpy:prod-20240328-1     /usr/bin/python3 ...  2 months ago   Up 2 months ago           systemd-postmanpy
c26363f97342  <censored>:5050/populi/saig:prod-20240415-2          /var/fti_saig/sai...  5 weeks ago    Up 5 weeks ago            systemd-saig

However, the podman connector in XPipe doesn't show any running containers:

image

If I turn the "show non-running containers" switch on, it does show the containers, but has some kind of error symbol next to them:

image

I can successfully shell into the "non-running" containers and browse their filesystems, so clearly they're running.

crschnick commented 3 months ago

That seems to be a display issue then if you can connect to the containers.

That shouldn't be too hard to fix.

coandco commented 3 months ago

Yeah, it's an easy workaround. Just figured you'd want to know.

coandco commented 3 months ago

Just noticed that the Podman connector isn't offering the ability to attach to the container or view the logs, presumably because it thinks the container isn't running. If that's the case, that's definitely a loss in functionality that isn't worked around by toggling the "show non-running containers" switch.

project-maya commented 3 months ago

hi, i got the same issues. but my container are for system container.

$ podman ps
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES

$ sudo podman ps
CONTAINER ID  IMAGE                                      COMMAND               CREATED       STATUS                   PORTS               NAMES
96a57a68b6ae  lscr.io/linuxserver/ddclient:latest                              7 weeks ago   Up 15 minutes                                ddclient
88ec879e2f5e  docker.io/jc21/nginx-proxy-manager:latest                        7 weeks ago   Up 15 minutes            <censored>          npm_app_1
e458c84c067e  docker.io/library/postgres:13              postgres              3 weeks ago   Up 15 minutes            <censored>          compose_db_1
2bb6cdd9e5bc  docker.io/library/memcached:latest         memcached             3 weeks ago   Up 15 minutes            <censored>          compose_cache_1
6c99f4e50361  docker.io/openproject/openproject:14       ./docker/prod/web     3 weeks ago   Up 15 minutes (healthy)  <censored>          compose_web_1
00ccf3405732  docker.io/openproject/openproject:14       ./docker/prod/wor...  3 weeks ago   Up 15 minutes            <censored>          compose_worker_1
dacfcbbf1e85  docker.io/openproject/openproject:14       ./docker/prod/cro...  3 weeks ago   Up 15 minutes            <censored>          compose_cron_1
07efd8893fc6  docker.io/openproject/openproject:14       ./docker/prod/pro...  3 weeks ago   Up 14 minutes            <censored>          compose_proxy_1
6699fe40b376  docker.io/library/mariadb:latest           mariadbd              17 hours ago  Up 14 minutes            <censored>
bcdafca221b5  docker.io/tuxgasy/dolibarr:latest          apache2-foregroun...  17 hours ago  Up 14 minutes            <censored>          dolibarr_web_1

image

crschnick commented 3 months ago

I think that's a different issue. I didn't even know that you could run podman as root-only, that is why the containers are not shown. XPipe doesn't perform any sudo elevation for podman.

What you can try, is right click the root shell environment shown in your screenshot, click on find available connections, and select podman. That should run podman as root.

project-maya commented 3 months ago

Well, that work like a charm.. Thank you.

image

probably you can include this in the how to. Thank you again.

crschnick commented 3 months ago

This is now fixed in xpipe 10