Skip to content

[BUG] Can't set Memory Swappiness when using Podman #691

@264-bit

Description

@264-bit

Description

When using Dockhand with Podman, if Dockhand tries to set memory swappiness, the following error is given:
crun: cannot set memory swappiness with cgroupv2: OCI runtime error
I am not setting swappiness at all in any of my configs, but it appears Dockhand is trying to set swappiness on existing containers when restarting/updating them. See for example the attached update log from Dockhand's auto update job.

Can you please provide an option to avoid setting swappiness even if it's somehow detected in the config? It would be great if you could detect when the host is using podman but I'm not sure if this is possible.

Steps to reproduce

  1. Set up Podman, enable its docker socket
  2. Set up Dockhand and point it to Podman's docker socket
  3. Set up a container, enable auto updates
  4. Wait for the container to attempt to auto update
  5. Dockhand attempts to set swappiness and fails

Logs

dockhand Updating: caddy
dockhand Pulling docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine...
dockhand Recreating container...
dockhand Stopping container...
dockhand Renaming old container...
dockhand Creating new container...
dockhand Starting new container...
error Start failed: crun: cannot set memory swappiness with cgroupv2: OCI runtime error, rolling back...
dockhand Rolling back: restoring old container...
error FAILED: crun: cannot set memory swappiness with cgroupv2: OCI runtime error

Browser logs

Dockhand version

1.0.19

Hawser version (if used)

No response

Connection mode

Socket

Please confirm the following

  • I have already searched for relevant existing issues and discussions before opening this report.
  • I have updated the title field above with a concise description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready to gofixed, goes to the next release

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions