Files
ignition/local_exporter.container
Dustin C. Hatch 5862ff4cc2 local_exporter: Remove After=zincati dependency
For some reason, the *zincati.service* unit has an `After=` dependency
on *multi-user.target*.  This creates a dependency loop between
*local_exporter.service* and *zincati.service* if the former has an
`After=` dependency on the latter an an (implicit) `Before=` dependency
on *multi-user.target*.  systemd will resolve this loop by removing one
or the other units from the bootup sequence, so either Zincati or the
local exporter will not start at boot.

We can avoid this dependency loop by removing the `After=` dependency
from *local_exporter.service*.  This may cause requests for Zincati
metrics to fail if it happens to come in after the local exporter starts
but before Zincati does, but this is unlikely to actually be an issue.
2023-10-04 20:50:30 -05:00

24 lines
494 B
Plaintext

[Unit]
Description=Bridge for local Prometheus metrics
After=network.target
[Container]
Image=git.pyrocufflink.net/containerimages/local_exporter:latest
Exec=serve
Volume=/run:/run:rw
Volume=/etc/local_exporter:/etc/local_exporter:ro
PublishPort=9598:9598
# Must run as user "zincati"
User=981
ReadOnly=yes
VolatileTmp=yes
# container_t does not have permission to write to var_run_t
SecurityLabelDisable=yes
NoNewPrivileges=yes
[Service]
Restart=always
[Install]
WantedBy=multi-user.target