Merge "Added OvS permission workaround for enabling DPDK"
authorJenkins <jenkins@review.openstack.org>
Thu, 13 Jul 2017 18:33:29 +0000 (18:33 +0000)
committerGerrit Code Review <review@openstack.org>
Thu, 13 Jul 2017 18:33:29 +0000 (18:33 +0000)
extraconfig/pre_network/host_config_and_reboot.yaml
releasenotes/notes/ovs-dpdk-permission-workaround-20aaebcc8d6009ec.yaml [new file with mode: 0644]

index 6c46133..31d0c1e 100644 (file)
@@ -193,6 +193,32 @@ resources:
           template: |
             #!/bin/bash
             set -x
+
+            # OvS Permission issue temporary workaround
+            # https://bugzilla.redhat.com/show_bug.cgi?id=1459436
+            # Actual solution from openvswitch - https://mail.openvswitch.org/pipermail/ovs-dev/2017-June/333423.html
+            ovs_service_path="/usr/lib/systemd/system/ovs-vswitchd.service"
+
+            if grep -q 'RuntimeDirectoryMode' $ovs_service_path; then
+                sed -i 's/RuntimeDirectoryMode=.*/RuntimeDirectoryMode=0775/' $ovs_service_path
+            else
+                echo "RuntimeDirectoryMode=0775" >> $ovs_service_path
+            fi
+
+            if ! grep -Fxq "Group=qemu" $ovs_service_path ; then
+              echo "Group=qemu" >> $ovs_service_path
+            fi
+
+            if ! grep -Fxq "UMask=0002" $ovs_service_path ; then
+              echo "UMask=0002" >> $ovs_service_path
+            fi
+
+            ovs_ctl_path='/usr/share/openvswitch/scripts/ovs-ctl'
+            if ! grep -q "umask 0002 \&\& start_daemon \"\$OVS_VSWITCHD_PRIORITY\"" $ovs_ctl_path ; then
+              sed -i 's/start_daemon \"\$OVS_VSWITCHD_PRIORITY\"/umask 0002 \&\& start_daemon \"$OVS_VSWITCHD_PRIORITY\"/' $ovs_ctl_path
+            fi
+
+
             # DO NOT use --detailed-exitcodes
             puppet apply --logdest console \
               --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules \
diff --git a/releasenotes/notes/ovs-dpdk-permission-workaround-20aaebcc8d6009ec.yaml b/releasenotes/notes/ovs-dpdk-permission-workaround-20aaebcc8d6009ec.yaml
new file mode 100644 (file)
index 0000000..f8c06fd
--- /dev/null
@@ -0,0 +1,6 @@
+---
+fixes:
+  - Fixed the openvswitch permission to allow ovs to access vhost
+    sockets created by qemu. This is a workaround until openvswitch
+    provides the actual solution.
+