feat(podman): add a role that defaults to crun #58
No reviewers
Labels
No labels
bug
cannot reproduce
duplicate
enhancement
help wanted
invalid
need info
need triage
need verification
not a bug
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
claudiomaradonna/castrum!58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/podman-crun"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
castrum's service roles configure what a host runs once the host
switches them on. Hosts that run their containers with podman had no
such role: podman started containers with whatever OCI runtime it found,
runc where crun was not installed, and no flag said which hosts use
podman at all. The owner of a few podman workstations wants crun, the
runtime podman prefers, on every one of them.
What changed
A new service role,
podman, switched on per host withpodman_enabled: true. It installs the distribution'scrunpackageand writes
/etc/containers/containers.conf.d/castrum-runtime.conf,which sets
runtime = "crun"under[engine]. The host's owncontainers.confand other drop-ins stay as they are, and installingpodman stays with the host.
A host that sets the flag and whose
podman --versiondoes not answerfails the run at this role, before the package and the drop-in, also
under
--check. Under-e update_only=truethe role does nothing.Docker is outside this change:
docker-engineanddaemon.jsonareuntouched.
The role joins
service_roles, the role catalogue and theupdate_onlytable. A new gate,
tests/gates/check_podman.sh, joinsmake check,and a molecule scenario joins
make test.How to verify
Set up as CONTRIBUTING says. Base
mainat9fe0d4b, branchfeat/podman-crunat58e673c.The refusal, run and passed on the branch:
It prints one line ending "with the flag off or under update_only
nothing runs". Copied onto the base with its fixture, it fails with
"The role 'podman' was not found".
The install and the drop-in, untested: the environment the
change was written in has no podman.
Expected: the scenario converges, its idempotence step reports no
change, and verify finds
cruninstalled, the drop-in naming crunand the planted
containers.confandhost-own.confunchanged.On a host the role has run on, as the user who owns the containers:
Expected:
crun. Untested: no playbook ran against a real host.Checks run on the branch:
make checkpassed, with its 16 gates andthe linters;
make verifystopped at "ERROR: 'make test' needspodman", so the molecule scenarios and the
tag_propagationgate didnot run.
Considerations
reviewers. Run step 2 before merging.
podman, since Debian's package depends on crunor runc and would leave the role nothing to install. No test
exercises a real podman reading the drop-in.
the containers created after the role.
castrum-runtime.confand names aruntime wins, as does a user's own
~/.config/containers/containers.conf; the README says so.that the refusal names the flag, not the return code and stderr the
message also prints.