diff options
author | Billy O'Mahony <billy.o.mahony@intel.com> | 2016-01-27 15:55:55 +0000 |
---|---|---|
committer | Billy O'Mahony <billy.o.mahony@intel.com> | 2016-01-27 16:32:41 +0000 |
commit | 7ce21aebcdabafaa24601104643cbd1c0b4bc8e4 (patch) | |
tree | 3af5c64d3915b6081032c17fb19df29df74cbd4c /fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/manifests/postinstall_ovs_dpdk.pp | |
parent | b29797556682c8be8d33cf66fa2ae100a9c2bda7 (diff) |
fuel-plugins: Fuel8 Liberty rebase
Change-Id: I9c0e3ab4c8fde13765ec286d4c7c717070230983
Signed-off-by: Michal Ptacek <michalx.ptacek@intel.com>
Reviewed-by: Mark D. Gray <mark.d.gray@intel.com>
Reviewed-by: Billy O'Mahony <billy.o.mahony@intel.com>
Diffstat (limited to 'fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/manifests/postinstall_ovs_dpdk.pp')
-rwxr-xr-x | fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/manifests/postinstall_ovs_dpdk.pp | 82 |
1 files changed, 43 insertions, 39 deletions
diff --git a/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/manifests/postinstall_ovs_dpdk.pp b/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/manifests/postinstall_ovs_dpdk.pp index a3fd60f..12230c6 100755 --- a/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/manifests/postinstall_ovs_dpdk.pp +++ b/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/manifests/postinstall_ovs_dpdk.pp @@ -16,6 +16,7 @@ class ovsdpdk::postinstall_ovs_dpdk ( package {'crudini': ensure => installed } + # compute node specific changes if $compute == 'True' { # adapt configuration files exec {'adapt_nova_conf': @@ -27,10 +28,18 @@ class ovsdpdk::postinstall_ovs_dpdk ( } exec {'adapt_ml2_conf_datapath': - command => "sudo crudini --set ${ml2_ovs_conf} ovs datapath_type ${ovs_datapath_type}", + command => "sudo crudini --set ${ml2_conf} ovs datapath_type ${ovs_datapath_type}", path => ['/usr/bin','/bin'], user => root, - onlyif => "test -f ${ml2_ovs_conf}", + onlyif => "test -f ${ml2_conf}", + require => Package['crudini'], + } + + exec {'adapt_ml2_conf_agent_type': + command => "sudo crudini --set ${ml2_conf} agent agent_type 'DPDK OVS Agent'", + path => ['/usr/bin','/bin'], + user => root, + onlyif => "test -f ${ml2_conf}", require => Package['crudini'], } @@ -53,7 +62,8 @@ class ovsdpdk::postinstall_ovs_dpdk ( require => Service["${openvswitch_service_name}"], } - exec { "${plugin_dir}/files/configure_bridges.sh ${ovs_datapath_type}": + exec {'configure_bridges': + command => "${plugin_dir}/files/configure_bridges.sh ${ovs_datapath_type}", user => root, require => Exec['restart_ovs'], } @@ -73,39 +83,36 @@ class ovsdpdk::postinstall_ovs_dpdk ( user => root, require => [ Exec['libvirtd_disable_tls'], Service['libvirtd'] ], } - } - exec {'adapt_ml2_conf_mechanism_driver': - command => "sudo crudini --set ${ml2_conf} ml2 mechanism_drivers ovsdpdk", - path => ['/usr/bin','/bin'], - user => root, - onlyif => "test -f ${ml2_conf}", - require => Package['crudini'], - } + service {"${openvswitch_agent}": + ensure => 'running', + require => [ Exec['restart_ovs'], Service["${openvswitch_service_name}"], Exec['adapt_ml2_conf_datapath'], Exec['adapt_ml2_conf_agent_type'] ], + } - exec {'adapt_ml2_conf_security_group': - command => "sudo crudini --set ${ml2_conf} securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver", - path => ['/usr/bin','/bin'], - user => root, - onlyif => "test -f ${ml2_conf}", - require => Package['crudini'], + exec { "ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=${ovs_pmd_core_mask}": + path => ['/usr/bin','/bin'], + user => root, + require => Service["${openvswitch_agent}"], + } } + # controller specific part if $controller == 'True' { service {'neutron-server': ensure => 'running', } exec {'append_NUMATopologyFilter': - command => "sudo crudini --set ${nova_conf} DEFAULT scheduler_default_filters RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter", + command => "sudo crudini --set ${nova_conf} DEFAULT scheduler_default_filters RetryFilter,AvailabilityZoneFilter,RamFilter,\ +CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter", path => ['/usr/bin','/bin'], user => root, onlyif => "test -f ${nova_conf}", require => Package['crudini'], } - exec { 'remove_old_agent': - command => "${plugin_dir}/files/remove_agent.sh $adminrc_user $adminrc_password $adminrc_tenant $adminrc_hostname", + exec { 'agents_flavors_update': + command => "${plugin_dir}/files/agents_flavors_update.sh", user => 'root', logoutput => 'true', timeout => 0, @@ -115,34 +122,31 @@ class ovsdpdk::postinstall_ovs_dpdk ( exec {'restart_neutron_server': command => "/usr/sbin/service neutron-server restart", user => root, - require => Exec['remove_old_agent'], + require => Exec['agents_flavors_update'], } exec {'restart_nova_scheduler': command => "/usr/sbin/service nova-scheduler restart", user => root, - require => Exec['remove_old_agent'], + require => Exec['agents_flavors_update'], } } - if $compute == 'True' { - exec { 'patch_ovs_agent': - command => "cp ${plugin_dir}/files/neutron-plugin-openvswitch-agent.conf /etc/init/neutron-plugin-openvswitch-agent.conf", - path => ['/usr/bin','/bin'], - user => root, - } - - service {"${openvswitch_agent}": - ensure => 'running', - require => [ Exec['restart_ovs'], Service["${openvswitch_service_name}"], Exec['patch_ovs_agent'] ], - } - - exec { "ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=${ovs_pmd_core_mask}": - path => ['/usr/bin','/bin'], - user => root, - require => Service["${openvswitch_agent}"], - } + # common part + exec {'adapt_ml2_conf_mechanism_driver': + command => "sudo crudini --set ${ml2_conf} ml2 mechanism_drivers ovsdpdk", + path => ['/usr/bin','/bin'], + user => root, + onlyif => "test -f ${ml2_conf}", + require => Package['crudini'], } + exec {'adapt_ml2_conf_security_group': + command => "sudo crudini --set ${ml2_conf} securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver", + path => ['/usr/bin','/bin'], + user => root, + onlyif => "test -f ${ml2_conf}", + require => Package['crudini'], + } } |