提交 1163fa36 编写于 作者: M Michael Chapman 提交者: Michal Privoznik

virtlockd: improve systemd units

- Pass VIRTLOCKD_ARGS through to virtlockd.

- Use SIGUSR1, not SIGHUP, in ExecReload. At present, virtlockd only
  responds to the former.

- Have "systemctl enable virtlockd.service" enable virtlockd.socket,
  rather than throw an error.

- Make virtlockd.socket wanted by sockets.target, rather than
  multi-user.target. This is consistent with other socket units in
  Fedora, and it ensures that the socket is available before libvirtd is
  started.
Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
上级 ea130e3b
...@@ -4,9 +4,12 @@ Requires=virtlockd.socket ...@@ -4,9 +4,12 @@ Requires=virtlockd.socket
[Service] [Service]
EnvironmentFile=-/etc/sysconfig/virtlockd EnvironmentFile=-/etc/sysconfig/virtlockd
ExecStart=@sbindir@/virtlockd ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -USR1 $MAINPID
# Loosing the locks is a really bad thing that will # Loosing the locks is a really bad thing that will
# cause the machine to be fenced (rebooted), so make # cause the machine to be fenced (rebooted), so make
# sure we discourage OOM killer # sure we discourage OOM killer
OOMScoreAdjust=-900 OOMScoreAdjust=-900
[Install]
Also=virtlockd.socket
...@@ -5,4 +5,4 @@ Description=Virtual machine lock manager socket ...@@ -5,4 +5,4 @@ Description=Virtual machine lock manager socket
ListenStream=@localstatedir@/run/libvirt/virtlockd-sock ListenStream=@localstatedir@/run/libvirt/virtlockd-sock
[Install] [Install]
WantedBy=multi-user.target WantedBy=sockets.target
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册