Quadlet - use the default runtime

Do not set the runtime when processing a .container file
Let Podman choose the runtime based on its configuration

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
This commit is contained in:
Ygal Blum
2023-02-22 09:36:20 +02:00
parent 1eccb010db
commit 0d75854c52
3 changed files with 3 additions and 6 deletions

View File

@ -319,11 +319,9 @@ func ConvertContainer(container *parser.UnitFile, isUser bool) (*parser.UnitFile
handleLogDriver(container, ContainerGroup, podman) handleLogDriver(container, ContainerGroup, podman)
// We use crun as the runtime and delegated groups to it // We delegate groups to the runtime
service.Add(ServiceGroup, "Delegate", "yes") service.Add(ServiceGroup, "Delegate", "yes")
podman.add( podman.add("--cgroups=split")
"--runtime", "crun",
"--cgroups=split")
timezone, ok := container.Lookup(ContainerGroup, KeyTimezone) timezone, ok := container.Lookup(ContainerGroup, KeyTimezone)
if ok && len(timezone) > 0 { if ok && len(timezone) > 0 {

View File

@ -1,4 +1,4 @@
## assert-podman-final-args run --name=systemd-%N --cidfile=%t/%N.cid --replace --rm --log-driver passthrough --runtime crun --cgroups=split --sdnotify=conmon -d localhost/imagename ## assert-podman-final-args run --name=systemd-%N --cidfile=%t/%N.cid --replace --rm --log-driver passthrough --cgroups=split --sdnotify=conmon -d localhost/imagename
[Container] [Container]
Image=localhost/imagename Image=localhost/imagename

View File

@ -5,7 +5,6 @@
## assert-podman-args "--replace" ## assert-podman-args "--replace"
## assert-podman-args "-d" ## assert-podman-args "-d"
## assert-podman-args "--log-driver" "passthrough" ## assert-podman-args "--log-driver" "passthrough"
## assert-podman-args "--runtime" "crun"
## assert-podman-args "--cgroups=split" ## assert-podman-args "--cgroups=split"
## assert-podman-args "--sdnotify=conmon" ## assert-podman-args "--sdnotify=conmon"
## assert-key-is "Unit" "RequiresMountsFor" "%t/containers" ## assert-key-is "Unit" "RequiresMountsFor" "%t/containers"