From 1cd6444358c362f8d50fec9497f84f17d85cb0f9 Mon Sep 17 00:00:00 2001 From: Sofer Athlan-Guyot Date: Thu, 7 Jul 2016 12:01:03 +0200 Subject: [PATCH] Fix puppet-neutron's gate 1) Include openstacklib defaults manifest. This provides a mechanism for setting default across all modules. 2) Update unit tests for cisco n1kv vem backend. 3) Configure OVS agent to run old interface, and not Ryu (SElinux alert). 4) Disable sriov backend, we already deploy classic ML2 OVS agent. 5) Specify of_interface and ovsdb_interface in acceptance. Change-Id: I63e47ab1ae1d44fd570e4f14c722111fc14328ce Related-Bug: 1599113 --- manifests/params.pp | 1 + spec/acceptance/basic_neutron_spec.rb | 19 ++++++++++++++++--- spec/classes/neutron_agents_n1kv_vem_spec.rb | 8 +++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index e2b473b60..f9f6beb98 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,5 +1,6 @@ # class neutron::params { + include ::openstacklib::defaults if($::osfamily == 'Redhat') { $nobody_user_group = 'nobody' diff --git a/spec/acceptance/basic_neutron_spec.rb b/spec/acceptance/basic_neutron_spec.rb index 80b4c4da4..52d33e4f9 100644 --- a/spec/acceptance/basic_neutron_spec.rb +++ b/spec/acceptance/basic_neutron_spec.rb @@ -51,7 +51,7 @@ describe 'basic neutron' do class { '::neutron::plugins::ml2': type_drivers => ['vxlan'], tenant_network_types => ['vxlan'], - mechanism_drivers => ['openvswitch', 'sriovnicswitch'] + mechanism_drivers => ['openvswitch'], } class { '::neutron::server': database_connection => 'mysql+pymysql://neutron:a_big_secret@127.0.0.1/neutron?charset=utf8', @@ -73,11 +73,24 @@ describe 'basic neutron' do class { '::neutron::agents::ml2::ovs': enable_tunneling => true, local_ip => '127.0.0.1', - tunnel_types => ['vxlan'], + tunnel_types => ['vxlan'], } - class { '::neutron::agents::ml2::sriov': } class { '::neutron::services::lbaas::haproxy': } class { '::neutron::services::lbaas::octavia': } + + # Prior to Newton, the neutron-openvswitch-agent used 'ovs-ofctl' of_interface driver by default. + # In Newton, 'of_interface' defaults to 'native'. + # This mostly eliminates spawning ovs-ofctl and improves performance a little. + # Current openstack-selinux does not allow the Ryu controller to listen on 6633 port. + # So in the meantime, let's use old interface: + # TODO (degorenko): move both parameters to ::neutron::agents::ml2::ovs class + # https://review.openstack.org/#/c/344155/ + neutron_agent_ovs { + 'ovs/of_interface': value => 'ovs-ofctl'; + } + Neutron_agent_ovs<| title == 'ovs/ovsdb_interface'|>{ + value => 'vsctl', + } EOS diff --git a/spec/classes/neutron_agents_n1kv_vem_spec.rb b/spec/classes/neutron_agents_n1kv_vem_spec.rb index 690619404..93aa67cb7 100644 --- a/spec/classes/neutron_agents_n1kv_vem_spec.rb +++ b/spec/classes/neutron_agents_n1kv_vem_spec.rb @@ -3,9 +3,11 @@ require 'spec_helper' describe 'neutron::agents::n1kv_vem' do let :facts do - { :operatingsystem => 'RedHat', - :operatingsystemrelease => '7', - :osfamily => 'RedHat' } + OSDefaults.get_facts({ + :operatingsystem => 'RedHat', + :operatingsystemrelease => '7', + :osfamily => 'RedHat', + }) end it 'should have a n1kv-vem config file' do