summaryrefslogtreecommitdiff
path: root/rhel
diff options
context:
space:
mode:
authorMark Michelson <mmichels@redhat.com>2017-08-02 13:43:04 -0500
committerRussell Bryant <russell@ovn.org>2017-08-03 11:16:49 -0400
commit94896b2e8117e999155a026ccbde9df9800c2c39 (patch)
treecf394c484327da3b12880ff83f10bae3fb9ce292 /rhel
parentd19cf8bb798ff52d69893d77032a0ec0e9325b75 (diff)
downloadopenvswitch-94896b2e8117e999155a026ccbde9df9800c2c39.tar.gz
rhel: Use systemd Restart option for ovn-controllers.
This change stops the use of OVS's monitor for the ovn-controller and ovn-controller-vtep systemd services. Instead, the services use the systemd Restart option to restart the services automatically if they fail. This patch changes the ovn-controller service Type from "oneshot" to "forking". The Restart option is incompatible with oneshot services. The patch does not change the ovn-controller-vtep service type from "simple", however. Signed-off-by: Mark Michelson <mmichels@redhat.com> Acked-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'rhel')
-rw-r--r--rhel/usr_lib_systemd_system_ovn-controller-vtep.service1
-rw-r--r--rhel/usr_lib_systemd_system_ovn-controller.service7
2 files changed, 5 insertions, 3 deletions
diff --git a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service
index 8ca95941b..4ca684ac0 100644
--- a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service
+++ b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service
@@ -34,6 +34,7 @@ After=openvswitch.service
[Service]
Type=simple
+Restart=on-failure
Environment=OVS_RUNDIR=%t/openvswitch
Environment=OVN_DB=unix:%t/openvswitch/db.sock
Environment=VTEP_DB=unix:%t/openvswitch/db.sock
diff --git a/rhel/usr_lib_systemd_system_ovn-controller.service b/rhel/usr_lib_systemd_system_ovn-controller.service
index a21a7debd..283e581df 100644
--- a/rhel/usr_lib_systemd_system_ovn-controller.service
+++ b/rhel/usr_lib_systemd_system_ovn-controller.service
@@ -20,10 +20,11 @@ Requires=openvswitch.service
After=openvswitch.service
[Service]
-Type=oneshot
-RemainAfterExit=yes
+Type=forking
+Restart=on-failure
EnvironmentFile=-/etc/sysconfig/ovn-controller
-ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_controller $OVN_CONTROLLER_OPTS
+ExecStart=/usr/share/openvswitch/scripts/ovn-ctl --no-monitor \
+ start_controller $OVN_CONTROLLER_OPTS
ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_controller
[Install]