aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig/pre_network/host_config_and_reboot.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'extraconfig/pre_network/host_config_and_reboot.yaml')
-rw-r--r--extraconfig/pre_network/host_config_and_reboot.yaml49
1 files changed, 47 insertions, 2 deletions
diff --git a/extraconfig/pre_network/host_config_and_reboot.yaml b/extraconfig/pre_network/host_config_and_reboot.yaml
index 009a0879..31d0c1e0 100644
--- a/extraconfig/pre_network/host_config_and_reboot.yaml
+++ b/extraconfig/pre_network/host_config_and_reboot.yaml
@@ -95,6 +95,13 @@ parameters:
default: "vfio-pci"
description: DPDK Driver type
type: string
+ deployment_actions:
+ default: ['CREATE', 'UPDATE']
+ type: comma_delimited_list
+ description: >
+ List of stack actions that will trigger any deployments in this
+ templates. The actions will be an empty list of the server is in the
+ toplevel DeploymentServerBlacklist parameter's value.
conditions:
is_host_config_required: {not: {equals: [{get_param: [RoleParameters, KernelArgs]}, ""]}}
@@ -117,6 +124,10 @@ conditions:
socket_mem_empty: {equals: [{get_param: OvsDpdkSocketMemory}, '']}
driver_not_set: {equals: [{get_param: OvsDpdkDriverType}, 'vfio-pci']}
isol_cpus_empty: {equals: [{get_param: IsolCpusList}, '0']}
+ deployment_actions_empty:
+ equals:
+ - {get_param: deployment_actions}
+ - []
resources:
RoleParametersValue:
@@ -162,7 +173,11 @@ resources:
name: HostParametersDeployment
server: {get_param: server}
config: {get_resource: HostParametersConfig}
- actions: ['CREATE'] # Only do this on CREATE
+ actions:
+ if:
+ - deployment_actions_empty
+ - []
+ - ['CREATE'] # Only do this on CREATE
input_values:
_KERNEL_ARGS_: {get_param: [RoleParameters, KernelArgs]}
_TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]}
@@ -178,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 \
@@ -224,7 +265,11 @@ resources:
name: RebootDeployment
server: {get_param: server}
config: {get_resource: RebootConfig}
- actions: ['CREATE'] # Only do this on CREATE
+ actions:
+ if:
+ - deployment_actions_empty
+ - []
+ - ['CREATE'] # Only do this on CREATE
signal_transport: NO_SIGNAL
outputs: