metalos/bzl/service/systemd-expectations.jinja2 (23 lines of code) (raw):
# check that the native service unit file is deployed and is sane
# There are three possible states for a service: enabled or disabled, and static.
# - Enabled means it has a symlink in a .wants directory.
# - Disabled means it does not.
# - Static means the service is missing the [Install] section in its init script, so you cannot enable or disable it.
['{{ service_name }}.service']
state = 'static'
##### THESE BELOW ARE COPIED FROM metalos/os/tests/systemd-expectations.toml #####
# systemd-analyze verify problems that are allowlisted
[[problem."quotaon.service"]]
kind = 'NotExecutable'
path = '/usr/sbin/quotaon'
reason = 'No such file or directory'
[[problem."rc-local.service"]]
kind = 'NotExecutable'
path = '/etc/rc.d/rc.local'
reason = 'No such file or directory'
# AFAICT this is not a real problem, it just so happens that syslog.service is
# not loaded in the container image when we check, but it should be totally fine
# at runtime
[[problem."syslog.socket"]]
kind = 'Uncategorized'
raw = 'service syslog.service not loaded, socket cannot be started.'