Skip to content

fix: start monit after the units of Core's processes (keel#61) - #21

Merged
marcos-mendez merged 2 commits into
masterfrom
fix/monit-after-core-services
Oct 2, 2026
Merged

marcos-mendez merged 2 commits into
masterfrom
fix/monit-after-core-services

Conversation

@marcos-mendez

Copy link
Copy Markdown

Item 2 of Keel-Linux/keel#61: in monit's first cycle after a boot, webmin and postfix showed as inactive.

Root cause: monit.service started alongside the units it checks. Monit's Core checks are the units of the manifest's processes (systemctl is-active ssh/webmin/postfix), so its first check could run before those units had finished starting.

Fix: the keel-core package (0.1.1) ships /usr/lib/systemd/system/monit.service.d/keel-core.conf with After=ssh.service webmin.service postfix.service. This only orders startup: a unit that fails does not keep monit from starting, and monit then reports it. I did not use keel's set daemon ... with start delay instead, because that line is global and keel leaves the operator's cycle alone (decision 0021).

Tests written first (tests/package.bats):

  • the drop-in is installed with mode 0644 and owned by root;
  • its After= list equals the manifest's units;
  • systemd-analyze verify accepts it.

lintian is clean. tests/README.md no longer says that inspect loses the monitor channels (fixed by keel 0.15.1, Keel-Linux/keel#64).

Real test: an LXC container from the step 7b Core image with this package installed. systemctl show monit -p After lists the three units. After a reboot, systemd-analyze critical-chain monit.service shows monit after postfix, the first monit summary showed keel-unit-sshd/webmin/postfix and their probes all OK, and monit.log had no failures. The container was destroyed afterwards.

This PR does not touch #19 (the console art): different files, and #19's recipe changelog entry is (4). Only packages/keel-core/debian/changelog changes here.

  • CI green
  • Review

Refs Keel-Linux/keel#61

navigator and others added 2 commits October 2, 2026 03:48
A systemd drop-in in the keel-core package orders monit.service after
ssh, webmin and postfix, ordering only. Started beside them, monit's
first cycle after a boot found webmin and postfix inactive
(Keel-Linux/keel#61, item 2). package.bats checks the drop-in matches
the manifest's units; keel-core 0.1.1.
@marcos-mendez
marcos-mendez merged commit 1902ac8 into master Oct 2, 2026
5 checks passed
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