fix: a container does not run systemd-modules-load #51
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/common!51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/modules-load-container"
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?
Every step 12 lean-core image booted
degraded:systemd-modules-load.servicefailed withFailed to initialize libkmod context: Operation not supported.Cause
The container core has no kernel and no /lib/modules (handbook decision 0052). kmod ships /etc/modules-load.d/modules.conf, which satisfies a triggering condition of the packaged unit. Its
ConditionCapability=CAP_SYS_MODULEpasses in the user namespace of the container, as for the units of #34.Change
conf/turnkey.d/container-unitsalso writes thekeel-container.confdrop-in (ConditionVirtualization=!container) forsystemd-modules-load.service. In a container the unit stays inactive with the condition unmet. On a VM or bare metal, which the ISO boot layer (plans/keel-boot) boots, it loads modules as before. Nothing is masked.Tests
tests/container-units.bats: the drop-in is installed, read beside a copy of the packaged unit (tests/fixtures/systemd-modules-load.service, systemd 257.13) bysystemd-analyze conditionandverify; the boot layer does not touch the unit. 100 percent of the script's lines.tests/container-units-live.bats(CI job install, booted trixie LXC container): writes a module list into /etc/modules-load.d, applies the script, and checks that systemd skips the unit on the condition and does not mark it failed.Changelog entry in the unreleased turnkey-core-19.0 (1); COVERAGE.md section.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.