1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-19 14:04:17 +03:00
lvm2/scripts/dm_event_systemd_red_hat.service.in
Thomas Lamprecht a781b1c178 dmeventd: ensure systemd service gets stopped on shutdown
Add these for dmeventd systemd unit (dm-event.service):

  Before: shutdown.target
  Conflicts: shutdown.target

This will cause the dmeventd to be properly stopped at shutdown (after
all the dmeventd clients unregistered their devices from monitoring)
with dm-event.service's stop action (there's no direct action defined
for the "stop" so systemd sends SIGTERM instead).

Before, we let dmeventd to get killed only as part of the very last
SIGTERM/SIGKILL for all the remaining processes late in the shutdown
sequence so we may have missed some logs if dmeventd encountered an
error during its shutdown (logging facilities are already off at this
late time in shutdown sequence).

Ref: https://www.redhat.com/archives/lvm-devel/2017-October/msg00000.html
2017-10-05 13:01:55 +02:00

19 lines
381 B
SYSTEMD

[Unit]
Description=Device-mapper event daemon
Documentation=man:dmeventd(8)
Requires=dm-event.socket
After=dm-event.socket
Before=local-fs-pre.target shutdown.target
Conflicts=shutdown.target
DefaultDependencies=no
[Service]
Type=simple
ExecStart=@sbindir@/dmeventd -f
Environment=SD_ACTIVATION=1
PIDFile=@DMEVENTD_PIDFILE@
OOMScoreAdjust=-1000
[Install]
WantedBy=sysinit.target