What problem do Podman quadlets actually solve?

I have several Podman containers running via systemd services generated by 'podman generate systemd --new'. They work well, the unit files are easy to read and they are quite portable and easy to use, maintain and deploy using git or whatever version control you use.

Now I am reading that "generate systemd" is being deprecated in favour of quadlets. I took a look at some examples and I really don't get what problem they are supposed to be solving. Sure, yeah, instead of a long podman run command line inside of a systemd unit file you now have a dedicated Container section. And? Why?

I seem to be losing the actual automatic generative part of "podman generate systemd --new" that allows me to instantly capture a running container's configuration and then run it as a service in perpetuity and easily port the configuration elsewhere and now have to write things by hand again and for this loss I'm gaining... what exactly?
 
  • Like
Reactions: Idesmi

koala

Ars Tribunus Angusticlavius
7,579
I had no idea how quadlets work, but I'm curious and looked it up.


One benefit is if a newer version of Podman is released with fixes or enhancements to the generator, your service is updated with the enhanced version the next time systemctl daemon-reload executes, such as upon reboot.

Seems to be a smallish benefit, IMHO.

Apparently, you can still do /usr/libexec/podman/quadlet -dryrun -user to generate the same unit file?

I think one of the benefits of Quadlets is sharing definitions with Kubernetes pod templates, but I guess that really is only handy if you are maintaining a piece of software and you must support both kinds of deployments. Which I guess is a use-case for the people who implemented this...
 

adrinux

Seniorius Lurkius
11
A little late to the party but I'm just looking into Quadlet -- my production apps are all running on Debian 12 which has Podman 4.3.1 and Quadlet was merged into 4.4, I don't feel a rush is needed -- there is a tool called Podlet that will auto-generate Quadlet files from Podman commands, docker-compose files, kubernetes etc.

So you still have the auto-generation you had with podman generate systemd,

On the whole it feels like quadlet files are just podman specific systemd units, not much of a change and not what I was expecting from Quadlet. Small change with small improvements.
 

Burn24

Smack-Fu Master, in training
53
I'm building containers on a Fedora host by dropping a quadlet file into an instance via user-data. Gets picked up by systemd, pretty easy to setup, sane defaults, all from just dropping a single file in /etc . I'd never seen it before a couple weeks ago but was instantly a fan, it fit my use case so well.

Meanwhile, on a docker host I have to go configure it to actually retain logs...