Skip to content

docs(284): gotchas 9 + 10 from the first real podman workload - #300

Merged
ChrisonSimtian merged 1 commit into
mainfrom
docs/podman-gotchas-9-10
Jul 26, 2026
Merged

docs(284): gotchas 9 + 10 from the first real podman workload#300
ChrisonSimtian merged 1 commit into
mainfrom
docs/podman-gotchas-9-10

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Follow-up to #294, from Phase 1 (#285, Homelab.Stacks.SmartHome#4).

Phase 0 proved the platform on a throwaway host with a hello-world quadlet. Deploying an actual service (Leapmotor Mate on CT 6004) surfaced two more gotchas — both quadlet-authoring rules rather than engine bugs, which is why the throwaway didn't catch them.

9. Podman does not create missing bind-mount source directories

Docker does; podman refuses with Error: statfs …: no such file or directory. Combined with Restart=always that's a crash loop ending in start request repeated too quickly — six restarts in under two seconds. Fix is [Service] ExecStartPre=/usr/bin/mkdir -p …, which also makes the unit self-sufficient ahead of a data migration.

10. HealthCmd cannot carry a quoted command — at all

Quadlet rejoins systemd's word-split value, so inner quoting is destroyed however it's written. Both forms verified broken live:

Written Received
HealthCmd=python -c "…'http://…'…" unterminated string → /bin/sh: Syntax error: Unterminated quoted string every 30s
HealthCmd="python -c \"…\"" backslashes survived literally

The dangerous part is the failure mode: the container sits permanently unhealthy while the app serves HTTP 200, so anything keyed on health status reports a lie. A healthcheck must be quote-free; if it can't be (a python one-liner, because the image ships no curl/wget) then either drop it and rely on Restart=always, or render a script and call it quote-free — the latter needs the provisioner to render non-quadlet assets, which is a platform change.

Doc-only. Also notes that #5/#6/#9/#10 are author rules nothing enforces yet — the candidate for validate-time enforcement.

🤖 Generated with Claude Code

Phase 0 was proven on a throwaway host with a hello-world quadlet. Deploying an
actual service (Leapmotor Mate, CT 6004) surfaced two more, both quadlet-authoring
rules rather than engine bugs:

9. Podman does NOT create missing bind-mount source directories — Docker does.
   With Restart=always this is a crash loop ending in "start request repeated too
   quickly". Fix with [Service] ExecStartPre=mkdir -p, which also makes the unit
   self-sufficient ahead of a data migration.

10. HealthCmd cannot carry a quoted command at all. Quadlet rejoins systemd's
    word-split value, destroying inner quoting however it's written: bare quotes
    give podman an unterminated string, escaped \" survive literally. The nasty
    part is the failure mode — the container sits permanently "unhealthy" while
    the app serves HTTP 200, so monitoring keyed on health status lies. A
    healthcheck must be quote-free; if it can't be (python one-liner, because the
    image ships no curl/wget), drop it or render a script and call it quote-free.

Also records that #5/#6/#9/#10 are author rules nothing enforces yet — the
candidate for validate-time enforcement.

Refs #285, #284
@ChrisonSimtian
ChrisonSimtian merged commit 023f29a into main Jul 26, 2026
@ChrisonSimtian
ChrisonSimtian deleted the docs/podman-gotchas-9-10 branch July 26, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant