bbaaef
From 93ce545cbe5699814713913eff94a2b3dec7d7f7 Mon Sep 17 00:00:00 2001
bbaaef
From: Timothy Redaelli <tredaelli@redhat.com>
bbaaef
Date: Thu, 16 Jan 2020 15:25:13 +0100
bbaaef
Subject: [PATCH] RHEL-only: Add compatibility with openvswitch2.11 < 2.11.0-43
bbaaef
bbaaef
This is done by adding
bbaaef
	EnvironmentFile=/etc/openvswitch/default.conf
bbaaef
	EnvironmentFile=-/etc/sysconfig/openvswitch
bbaaef
to the service files.
bbaaef
bbaaef
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
bbaaef
---
bbaaef
 rhel/usr_lib_systemd_system_ovn-controller-vtep.service | 4 +++-
bbaaef
 rhel/usr_lib_systemd_system_ovn-controller.service      | 4 +++-
bbaaef
 rhel/usr_lib_systemd_system_ovn-northd.service          | 4 +++-
bbaaef
 3 files changed, 9 insertions(+), 3 deletions(-)
bbaaef
bbaaef
diff --git a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service
bbaaef
index b1e239f57..852cd1955 100644
bbaaef
--- a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service
bbaaef
+++ b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service
bbaaef
@@ -38,8 +38,10 @@ PIDFile=/var/run/openvswitch/ovn-controller-vtep.pid
bbaaef
 Restart=on-failure
bbaaef
 Environment=OVN_DB=unix:%t/openvswitch/ovnsb_db.sock
bbaaef
 Environment=VTEP_DB=unix:%t/openvswitch/db.sock
bbaaef
+EnvironmentFile=/etc/openvswitch/default.conf
bbaaef
+EnvironmentFile=-/etc/sysconfig/openvswitch
bbaaef
 EnvironmentFile=-/etc/sysconfig/ovn-controller-vtep
bbaaef
-EnvironmentFile=/run/openvswitch.useropts
bbaaef
+EnvironmentFile=-/run/openvswitch.useropts
bbaaef
 ExecStart=/usr/share/openvswitch/scripts/ovn-ctl \
bbaaef
           --db-sb-sock=${OVN_DB} --db-sock=${VTEP_DB} \
bbaaef
           --ovn-user=${OVS_USER_ID} \
bbaaef
diff --git a/rhel/usr_lib_systemd_system_ovn-controller.service b/rhel/usr_lib_systemd_system_ovn-controller.service
bbaaef
index 335cd5a52..f0df89331 100644
bbaaef
--- a/rhel/usr_lib_systemd_system_ovn-controller.service
bbaaef
+++ b/rhel/usr_lib_systemd_system_ovn-controller.service
bbaaef
@@ -23,8 +23,10 @@ After=openvswitch.service
bbaaef
 Type=forking
bbaaef
 PIDFile=/var/run/openvswitch/ovn-controller.pid
bbaaef
 Restart=on-failure
bbaaef
+EnvironmentFile=/etc/openvswitch/default.conf
bbaaef
+EnvironmentFile=-/etc/sysconfig/openvswitch
bbaaef
 EnvironmentFile=-/etc/sysconfig/ovn-controller
bbaaef
-EnvironmentFile=/run/openvswitch.useropts
bbaaef
+EnvironmentFile=-/run/openvswitch.useropts
bbaaef
 ExecStart=/usr/share/openvswitch/scripts/ovn-ctl --no-monitor \
bbaaef
           --ovn-user=${OVS_USER_ID} \
bbaaef
           start_controller $OVN_CONTROLLER_OPTS
bbaaef
diff --git a/rhel/usr_lib_systemd_system_ovn-northd.service b/rhel/usr_lib_systemd_system_ovn-northd.service
bbaaef
index ea8c191e3..82f3c4cfc 100644
bbaaef
--- a/rhel/usr_lib_systemd_system_ovn-northd.service
bbaaef
+++ b/rhel/usr_lib_systemd_system_ovn-northd.service
bbaaef
@@ -23,8 +23,10 @@ After=openvswitch.service
bbaaef
 Type=oneshot
bbaaef
 RemainAfterExit=yes
bbaaef
 Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch
bbaaef
+EnvironmentFile=/etc/openvswitch/default.conf
bbaaef
+EnvironmentFile=-/etc/sysconfig/openvswitch
bbaaef
 EnvironmentFile=-/etc/sysconfig/ovn-northd
bbaaef
-EnvironmentFile=/run/openvswitch.useropts
bbaaef
+EnvironmentFile=-/run/openvswitch.useropts
bbaaef
 ExecStartPre=-/usr/bin/chown -R ${OVS_USER_ID} ${OVS_DBDIR}
bbaaef
 ExecStart=/usr/share/openvswitch/scripts/ovn-ctl \
bbaaef
           --ovs-user=${OVS_USER_ID} --ovn-user=${OVS_USER_ID} \
bbaaef
-- 
bbaaef
2.24.1
bbaaef