1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
Commit Graph

6 Commits

Author SHA1 Message Date
Peter Rajnoha
8a8abc5ed9 dmeventd: fix dmeventd -R to work properly with systemd
Trying to restart dmeventd as a reload action is causing problems
under systemd environment. The systemd loses track of new dmeventd
this way. See also https://bugzilla.redhat.com/show_bug.cgi?id=1060134
for more info.

We need to call dmeventd -R directly instead of "systemctl reload dm-event.service"
that was used before (the reload is aimed at configuration reload anyway,
not stateful restart of the daemon - we did this before just because
there's no ExecRestart in systemd and there's only ExecStart and
ExecStop with which we'd lose the state).

Also, use ExecStart="dmeventd -f" to run dmeventd in foreground
(and let's rely on systemd to daemonize it) and change the
service type from "forking" to "simple".
2014-02-06 17:15:19 +01:00
Peter Rajnoha
e77803edc9 systemd: Add Documentation references
These documentation references show up in "systemctl status" output.
2012-06-20 14:23:50 +02:00
Peter Rajnoha
93945bb616 Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.
LISTEN_PID and LISTEN_FDS environment variables are defined only during systemd
"start" action. But we still need to know whether we're activated during
"reload" action as well - we use the reload action to call "dmeventd -R"/"lvmetad -R"
for statefull daemon restart. We can't use normal "restart" as that is simply
composed of "stop" and "start" and we would lose any state the daemon has.
2012-03-14 15:51:51 +00:00
Peter Rajnoha
b627165a75 Clean up systemd unit ordering and requirements. 2012-02-01 13:08:39 +00:00
Peter Rajnoha
8626490ca7 Add "ExecReload" to dm-event.service for systemd to reload dmeventd properly.
Normally, restart simply means "stop and start" for systemd. However, if
we're installing new versions of the dmeventd binary/libdevmapper, we need
to restart dmeventd. This fails if we have some devices monitored - we need
to call "dmeventd -R" instead.

The "ExecReload" did not work quite well in some old versions of systemd,
systemd assumed that only the configuration is reloaded on "ExecReload",
not the whole binary itself so it lost track of dmeventd daemon (it lost new
dmeventd PID). This is fixed and seems to be working fine now with recent
versions of dmeventd.
2011-10-31 12:22:49 +00:00
Peter Rajnoha
5071d9eceb Add systemd unit files for dmeventd. 2011-07-28 12:54:28 +00:00