summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch31
-rw-r--r--recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch14
-rw-r--r--recipes-networking/openvswitch/openvswitch_git.bb1
3 files changed, 40 insertions, 6 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch b/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
new file mode 100644
index 00000000..65290cf6
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
@@ -0,0 +1,31 @@
1From 219e7cf9f28fdf14747fdf674bec293f763fe8e3 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 4 Sep 2018 15:38:59 -0400
4Subject: [PATCH] systemd: create runtime dirs
5
6The recommendation would be to make use of "RuntimeDirectory=" and
7"RuntimeDirectoryMode=" instead of 'mkdir' and 'chown' but since the
8upstream service file uses 'chown' we will match this by using
9'mkdir'. Without this the service will fail to start since these
10directories won't exist.
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 rhel/usr_lib_systemd_system_ovsdb-server.service | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
18index 694598f..0bb2274 100644
19--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
20+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
21@@ -10,6 +10,7 @@ Type=forking
22 Restart=on-failure
23 EnvironmentFile=/etc/openvswitch/default.conf
24 EnvironmentFile=-/etc/sysconfig/openvswitch
25+ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch
26 ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
27 ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
28 EnvironmentFile=-/run/openvswitch/useropts
29--
302.7.4
31
diff --git a/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch b/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
index ec1c1110..d7d4c159 100644
--- a/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
+++ b/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
@@ -1,4 +1,4 @@
1From 3dbfcb0fa944b57215fab46fe484b02e69ff6e03 Mon Sep 17 00:00:00 2001 1From 163020a5bba1323dc337d72d4771bb81d824b0dc Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com> 2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 29 May 2018 18:57:46 +0000 3Date: Tue, 29 May 2018 18:57:46 +0000
4Subject: [PATCH] systemd: update tool paths 4Subject: [PATCH] systemd: update tool paths
@@ -9,8 +9,8 @@ different path, update accordingly.
9Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> 9Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
10--- 10---
11 rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 4 ++-- 11 rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 4 ++--
12 rhel/usr_lib_systemd_system_ovsdb-server.service | 2 +- 12 rhel/usr_lib_systemd_system_ovsdb-server.service | 4 ++--
13 2 files changed, 3 insertions(+), 3 deletions(-) 13 2 files changed, 4 insertions(+), 4 deletions(-)
14 14
15diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in 15diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
16index 11b34c6..94c48f8 100644 16index 11b34c6..94c48f8 100644
@@ -28,18 +28,20 @@ index 11b34c6..94c48f8 100644
28 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ 28 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
29 --no-ovsdb-server --no-monitor --system-id=random \ 29 --no-ovsdb-server --no-monitor --system-id=random \
30diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service 30diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
31index 70da1ec..c2c862f 100644 31index 70da1ec..694598f 100644
32--- a/rhel/usr_lib_systemd_system_ovsdb-server.service 32--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
33+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service 33+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
34@@ -10,7 +10,7 @@ Type=forking 34@@ -10,8 +10,8 @@ Type=forking
35 Restart=on-failure 35 Restart=on-failure
36 EnvironmentFile=/etc/openvswitch/default.conf 36 EnvironmentFile=/etc/openvswitch/default.conf
37 EnvironmentFile=-/etc/sysconfig/openvswitch 37 EnvironmentFile=-/etc/sysconfig/openvswitch
38-ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch 38-ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
39-ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
39+ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch 40+ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
40 ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi' 41+ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
41 EnvironmentFile=-/run/openvswitch/useropts 42 EnvironmentFile=-/run/openvswitch/useropts
42 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ 43 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
44 --no-ovs-vswitchd --no-monitor --system-id=random \
43-- 45--
442.7.4 462.7.4
45 47
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
index edffdcef..4a6002a9 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -30,6 +30,7 @@ SRC_URI = "file://openvswitch-switch \
30 file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \ 30 file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \
31 file://python-switch-remaining-scripts-to-use-python3.patch \ 31 file://python-switch-remaining-scripts-to-use-python3.patch \
32 file://systemd-update-tool-paths.patch \ 32 file://systemd-update-tool-paths.patch \
33 file://systemd-create-runtime-dirs.patch \
33 " 34 "
34 35
35LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab" 36LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"