Accessing host from inside Podman 5.0 container

Sometimes you need to connect to the host from a Podman container running on it. How would you do that? In the past I was able to get this working by connecting to the gateway IP of the container. For example, I have a web server running on the host listening on port 8080. ➜ nc -vz localhost 8080 Ncat: Version 7.92 ( https://nmap.org/ncat ) Ncat: Connected to 127.0.0.1:8080. Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds. Next, create a new container to run curl for testing. ...

December 2, 2024 · 2 min · 420 words · kenno

Expand ZFS partition to use entire disk

This is just a quick note to jot down what I did to resize and expand a ZFS partition to entire disk. I never had to do this before; it tured out it was quite easy. First ensure that the autoexpand option is set on the zpool. Then, stop the VM in order to resize the disk volume. [root@phnomaural ~]# zpool set autoexpand=on immich [root@phnomaural ~]# poweroff [root@phnomaural ~]# Connection to phnomaural closed by remote host. The original size of ZFS disk was 256 GiB, and it has been increased to 512 GiB. This was done by stopping the VM running on XCP-ng, and go to the disk and change the size to 256 GiB. ...

November 12, 2024 · 2 min · 246 words · kenno

Fix container to container DNS lookup failed in Podman OpenSUSE Leap 15.16

I’ve started to running more containers in my homelab with Podman, running inside AlamaLinux. Most of the times, things just worked. However today, I tried to setup similar containers on OpenSUSE Leap 15.16 host, and I came across an issue getting containers to communicate with one another. Well, spoiler alert, I found a solution, hence this blog post. TL;DR - install cni-plugin-dnsname package from cni-plugin-dnsname build service. (No package from the official OpenSUSE repo). ...

November 11, 2024 · 3 min · 572 words · kenno

NGINX 413 Request Entity Too Large

While trying to upload a file to a web app using NGINX as a reverse proxy, I encountered the following error: ... Save(<data/c5ceb2d914>) returned error, retrying after 19.847451977s: client.PutObject: <html>Documents/Fonts/FiraCode.zip <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.20.1</center> </body> </html> Save(<data/d194099394>) returned error, retrying after 36.899440019s: client.PutObject: <html>Documents/Fonts/FiraCode.zip <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.20.1</center> </body> </html> ... It turned out that NGINX has default value for file upload limit to 1 MB set in client_max_body_size variable. Therefore, I need to increase the file upload size to something bigger, says 50 MB. Where to update this file? Well, we can apply this change to the main NGINX’s configuration file, e.g. /etc/nginx/nginx.conf or specifically in the configuration file for the web app. I chose the latter for my case. ...

November 4, 2024 · 2 min · 224 words · kenno

Look up one own's public IP easily

Occasionally, I need to look up my own public IP for various reasons. To do this, I would google “what is my ip”, and got a result on the browser. Recently, I found a way to easily do this using curl command to an easy to remember URL ifconfig.io. Here is an example, of course with the fake IPs as the results: ➜ curl ifconfig.io 2444:3444:20a:5310:d6c9:ffff:fef1:7777 To get the IPv4, we can supply the -4 option to curl command: ...

October 28, 2024 · 1 min · 113 words · kenno