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