2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 06:45:17 +00:00

rhel: Use PIDFile on forking systemd service files

Currently, PIDFile is not used in systemd service files with
Type=forking. This means sometimes systemd fails to restart a daemon
that is killed (with SIGKILL) or that is crashed.

This commit adds PIDFile to all systemd service file with Type=forking
in order to always have the correct PID to monitor.

Reported-at: https://bugzilla.redhat.com/1653717
Reported-by: Candido Campos <ccamposr@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Timothy Redaelli
2019-02-28 18:27:46 +01:00
committed by Ben Pfaff
parent 8511af877c
commit f385abded5
4 changed files with 4 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ After=openvswitch.service
[Service]
Type=forking
PIDFile=/var/run/openvswitch/ovs-monitor-ipsec.pid
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
--ike-daemon=libreswan start-ovs-ipsec
ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop-ovs-ipsec

View File

@@ -21,6 +21,7 @@ After=openvswitch.service
[Service]
Type=forking
PIDFile=/var/run/openvswitch/ovn-controller.pid
Restart=on-failure
EnvironmentFile=-/etc/sysconfig/ovn-controller
ExecStart=/usr/share/openvswitch/scripts/ovn-ctl --no-monitor \

View File

@@ -9,6 +9,7 @@ PartOf=openvswitch.service
[Service]
Type=forking
PIDFile=/var/run/openvswitch/ovs-vswitchd.pid
Restart=on-failure
Environment=XDG_RUNTIME_DIR=/var/run/openvswitch
EnvironmentFile=/etc/openvswitch/default.conf

View File

@@ -7,6 +7,7 @@ PartOf=openvswitch.service
[Service]
Type=forking
PIDFile=/var/run/openvswitch/ovsdb-server.pid
Restart=on-failure
EnvironmentFile=/etc/openvswitch/default.conf
EnvironmentFile=-/etc/sysconfig/openvswitch