Replies: 2 comments 3 replies
-
Podman != docker, its often billed as a drop-in replacement, but in my experience it often isn't. Regarding the disks, you can enable debug and check the output in the logs, it'll give more info |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay in getting back. As I said the solution to all the errors I was getting with my rootless Podman setup was eschewing Podman's default network settings for containers. I don't know if this is THE solution or if there are any other better solutions. Unfortunately I am kind of new to the world of containers and I know bits and pieces, but I don't have a comprehensive grasp of the subject. I start setting up my containers using docker compose in portainer. Podman for the most part works fine with docker compose yaml files. Once I get the docker compose yaml files 95% of the way I want them I translate them into quadlets using podlet. This allows the containers to run as systemd services in fedora. I say all that because I have no clue how to do networking with docker compose. I will explain what I did with quadlets and someone can figure out what the docker version is. I will use the example of homepage. First I created a directory called homepage in /home/URUSERNAME/.config/containers/systemd. In that folder I put the quadlet file for homepage (homepage.container). I then created a file called homepage.network. The contents of that file are as follows:
As far as I can tell the key components are the subnet and gateway. WantedBy just ensures the network is always started at boot. Then in my homepage.container quadlet I just reference homepage.network as follows:
So I just added the line... Network=homepage.network. Ignore the SecurityLabelType= line. That was added just to deal with some SELinux issues. AutoUpdate=registry was added so that a timer can check for updates every few weeks and automatically update the container image... It is one of the benefits of using quadlets. No more watchtower. If you are using pods the process is a bit different. Setting up the network file is the same, but instead of referencing the network in the container file you reference it in the pod file. My pihole.pod file looks like this...
The pi-hole pod contains pi-hole and unbound. Once all your network, container, and pod files are set up the way you want...
Then start your containers with...
|
Beta Was this translation helpful? Give feedback.
-
Description
I have an issue where the storage widget does not display a value when my rootless homepage Podman container is set to network_mode: host. CPU and Memory resources work fine.
So your next question is why do you have it set to network_mode: host? If I set it to anything else (default, network_mode: container:vpn, etc) I get various patterns of API errors from the installed widgets. The only reliable way for me to have everything run, except the storage widget, is by using network_mode: host... and even that has another quirk. I have to launch the container and then restart it for the formatting to be correct. After that though everything is fine except the storage widget.
I really do not want a container running in network_mode: host on my server 24/7, which has limited my use of homepage. Ultimately I would like to use a more restrictive mode, but the API issues with the other modes I've tried render homepage unusable.
I originally had no desire to monitor my OS disk but I added it just to rule out any issues with USB direct attached storage. When adding my OS disk I noticed that I did not add the USB disk as a /mnt. I just used the /app/config volume that exists on that disk. I did the same with a volume called /test that is on my OS drive. I don't know if that makes any difference. With this configuration the internal OS drive has the same behavior as the USB HDD. No difference. Works perfectly with everything other than network_mode: host.
Anyway I thought it was really odd that changing the network mode would have such an effect on the storage widget.
My setup...
Apple M1 Mac mini
Storage in question is a single USB HDD, but I did test my internal OS drive and it has the same problem.
Running bare metal Linux headless...
My homepage yaml...
Section of the widgets.yaml...
From inside the homepage Podman container...
I am using a vpn container as my network mode for most of my other containers. Something like gluetun which is why I tried network_mode: container:vpn in my homepage yaml and had poor results.
I noticed #2509 was a discussion about an "empty disk widget" but didn't mention network_mode at all. I wonder if they had the same issue.
homepage version
v0.9.10 (132d8f4, Sep 26, 2024)
Installation method
Docker
Configuration
Storage widget
Container Logs
Container logs are pristine when using network_mode: host...
Listening on port 3000
The logs are a disaster with any other type of network I've tried. Just a sample...
Browser Logs
I get a 304 Not Modified response with network_mode: host.
Response Header...
Warnings from browser...
When I delete the network_mode: host line from my yaml and let podman just do its thing I get a 200 code instead of 304...
Troubleshooting
N/A
Beta Was this translation helpful? Give feedback.
All reactions