test(molecule): stop make test early below 1024 inotify instances #26

Merged
claudiomaradonna merged 1 commit from test/inotify-preflight into main 2026-10-07 23:31:27 +02:00
Collaborator

Why

make test failed on main with half the scenarios UNREACHABLE at their first task: podman exec reported "container state improper", because each failed container's systemd had exited 255 within milliseconds of starting. Every systemd container takes inotify instances charged to the user running podman, and at the stock fs.inotify.max_user_instances of 128 only about five start. Ten containers started one after another reproduced it (five up, five exited 255); at 1024 all ten stay up and make test runs.

What changed

  • tests/molecule/run.sh reads the limit before building the image and, below 1024, stops with the sysctl to set and where to keep it, instead of letting half the containers die.
  • CONTRIBUTING's Molecule section states the requirement.

Verification

  • make check passes.
  • With stub podman and molecule binaries, the runner proceeds at 1024 and stops with the message when the threshold is above the current limit.
  • The real cause was confirmed on the owner's machine: the container probe at 128 and at 1024, and make test after raising the limit.
## Why `make test` failed on main with half the scenarios UNREACHABLE at their first task: `podman exec` reported "container state improper", because each failed container's systemd had exited 255 within milliseconds of starting. Every systemd container takes inotify instances charged to the user running podman, and at the stock `fs.inotify.max_user_instances` of 128 only about five start. Ten containers started one after another reproduced it (five up, five exited 255); at 1024 all ten stay up and `make test` runs. ## What changed - `tests/molecule/run.sh` reads the limit before building the image and, below 1024, stops with the `sysctl` to set and where to keep it, instead of letting half the containers die. - CONTRIBUTING's Molecule section states the requirement. ## Verification - `make check` passes. - With stub `podman` and `molecule` binaries, the runner proceeds at 1024 and stops with the message when the threshold is above the current limit. - The real cause was confirmed on the owner's machine: the container probe at 128 and at 1024, and `make test` after raising the limit.
Every scenario's systemd takes inotify instances, all charged to the
user running podman. At the stock fs.inotify.max_user_instances of 128
only about five systemd containers start on the owner's machine; the
rest exit 255 within milliseconds, and the scenarios then fail at their
first task with UNREACHABLE, podman exec reporting "container state
improper". Ten containers started one after another reproduced it
(five up, five exited 255); at 1024 all ten stay up and make test runs.

The runner now reads the limit before building the image and, below
1024, stops with the sysctl to set and where to keep it. CONTRIBUTING's
Molecule section states the requirement. Checked with stub podman and
molecule binaries: the run proceeds at 1024, and a raised threshold
stops it with the message (scratch only).
claudiomaradonna deleted branch test/inotify-preflight 2026-10-07 23:31:30 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/castrum!26
No description provided.