[openstack-puppet-modules/f22] Updated patches from f22-patches

Ivan Chavero ichavero at fedoraproject.org
Wed Mar 11 02:00:48 UTC 2015


commit eecff8945f0abfb064a5785414cc010db4aa2ccf
Author: Ivan Chavero <ichavero at redhat.com>
Date:   Tue Mar 10 18:46:37 2015 -0700

    Updated patches from f22-patches

 ...ng-portdb-and-fastpath_flood-to-n1kv.conf.patch | 187 +++++++++++++++++++++
 ...e-default-value-of-fastpath_flood-to-enab.patch |  79 +++++++++
 openstack-puppet-modules.spec                      |   4 +
 3 files changed, 270 insertions(+)
---
diff --git a/0015-Adding-portdb-and-fastpath_flood-to-n1kv.conf.patch b/0015-Adding-portdb-and-fastpath_flood-to-n1kv.conf.patch
new file mode 100644
index 0000000..41b76a2
--- /dev/null
+++ b/0015-Adding-portdb-and-fastpath_flood-to-n1kv.conf.patch
@@ -0,0 +1,187 @@
+From 7fcb23d74f420273ee0fcddb374c325696ca8097 Mon Sep 17 00:00:00 2001
+From: Dulanjalie Ganegedara <ddhanapa at cisco.com>
+Date: Thu, 12 Feb 2015 16:31:52 -0800
+Subject: [PATCH] Adding portdb and fastpath_flood to n1kv.conf
+
+Also need to remove installing explicit installation of openvswitch
+and call vswitch::ovs instead.
+Adding testcases to neutron_agents_n1kv_vem_spec.rb and fixing an
+error in neutron_plugins_ml2_spec.rb
+
+Change-Id: I2b4ada801610d7081ac3e2469bcacd6ea5ec8e7d
+Closes-Bug: 1421449
+(cherry picked from commit ba0eb6f2f6db6b4a9d455a3ea54150ccc8020be7)
+
+Conflicts:
+	manifests/agents/n1kv_vem.pp
+
+Change-Id: I133cc7a184be8508470e46381f19c6f209620fe1
+(cherry picked from commit 29e1b15e82cb171437f5830721892c80e4aa2510)
+---
+ neutron/manifests/agents/n1kv_vem.pp               | 20 ++++++++----
+ .../spec/classes/neutron_agents_n1kv_vem_spec.rb   | 38 ++++++++++++++++++++--
+ neutron/templates/n1kv.conf.erb                    | 17 ++++++++++
+ 3 files changed, 66 insertions(+), 9 deletions(-)
+
+diff --git a/neutron/manifests/agents/n1kv_vem.pp b/neutron/manifests/agents/n1kv_vem.pp
+index 439355f..dc740c0 100644
+--- a/neutron/manifests/agents/n1kv_vem.pp
++++ b/neutron/manifests/agents/n1kv_vem.pp
+@@ -91,6 +91,14 @@
+ #   (optional) Whether to start/stop the service
+ #   Defaults to true
+ #
++# [*portdb*]
++#   (optional) PortDB (ovs|vem)
++#   Defaults to ovs
++#
++# [*fastpath_flood*]
++#   (optional) Handle broadcast floods and unknown pkts in fastpath(KLM)
++#   Defaults to disable
++#
+ class neutron::agents::n1kv_vem (
+   $n1kv_vsm_ip          = '127.0.0.1',
+   $n1kv_vsm_domain_id   = 1000,
+@@ -103,10 +111,13 @@ class neutron::agents::n1kv_vem (
+   $n1kv_version         = 'present',
+   $package_ensure       = 'present',
+   $enable               = true,
+-  $manage_service       = true
++  $manage_service       = true,
++  $portdb               = 'ovs',
++  $fastpath_flood       = 'disable'
+ ) {
+ 
+   include neutron::params
++  require vswitch::ovs
+ 
+   Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] }
+ 
+@@ -134,11 +145,6 @@ class neutron::agents::n1kv_vem (
+     name   => $::neutron::params::libnl_package
+   }
+ 
+-  package { 'openvswitch':
+-    ensure => $package_ensure,
+-    name   => $::neutron::params::ovs_package
+-  }
+-
+   file {
+     '/etc/n1kv':
+       ensure => directory,
+@@ -229,7 +235,7 @@ class neutron::agents::n1kv_vem (
+   }
+ 
+   Package['libnl']            -> Package['nexus1000v']
+-  Package['openvswitch']      -> Package['nexus1000v']
++  Service['openvswitch']      ~> Package['nexus1000v']
+   File['/etc/n1kv/n1kv.conf'] -> Package['nexus1000v']
+   Package['nexus1000v']       ~> Service['nexus1000v']
+ }
+diff --git a/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb b/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb
+index 9b7a4b1..4eeee17 100644
+--- a/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb
++++ b/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb
+@@ -17,7 +17,7 @@ describe 'neutron::agents::n1kv_vem' do
+ 
+   it 'install n1kv-vem' do
+     should contain_package('libnl').with_before('Package[nexus1000v]')
+-    should contain_package('openvswitch').with_before('Package[nexus1000v]')
++    should contain_service('openvswitch').with_notify('Package[nexus1000v]')
+     should contain_package('nexus1000v').with_notify('Service[nexus1000v]')
+     should contain_service('nexus1000v').with_ensure('running')
+   end
+@@ -66,7 +66,9 @@ describe 'neutron::agents::n1kv_vem' do
+     {
+       :n1kv_vsm_ip        => '9.0.0.1',
+       :n1kv_vsm_domain_id => 900,
+-      :host_mgmt_intf     => 'eth9'
++      :host_mgmt_intf     => 'eth9',
++      :portdb             => 'ovs',
++      :fastpath_flood     => 'disable'
+     }
+     end
+     it do
+@@ -77,11 +79,15 @@ describe 'neutron::agents::n1kv_vem' do
+       should contain_file('/etc/n1kv/n1kv.conf') \
+         .with_content(/^host-mgmt-intf eth9/)
+       should contain_file('/etc/n1kv/n1kv.conf') \
++        .with_content(/^portdb ovs/)
++      should contain_file('/etc/n1kv/n1kv.conf') \
+         .without_content(/^phys/)
+       should contain_file('/etc/n1kv/n1kv.conf') \
+         .without_content(/^virt/)
+       should contain_file('/etc/n1kv/n1kv.conf') \
+         .with_content(/^node-type compute/)
++      should contain_file('/etc/n1kv/n1kv.conf') \
++        .with_content(/^fastpath-flood disable/)
+     end
+   end
+ 
+@@ -99,6 +105,34 @@ describe 'neutron::agents::n1kv_vem' do
+     end
+   end
+ 
++  context 'verify portdb' do
++    let :params do
++    {
++      :portdb             => 'vem',
++    }
++    end
++    it do
++      should contain_file('/etc/n1kv/n1kv.conf') \
++        .with_content(/^portdb vem/)
++      should contain_file('/etc/n1kv/n1kv.conf') \
++        .without_content(/^portdb ovs/)
++    end
++  end
++
++  context 'verify fastpath_flood' do
++    let :params do
++    {
++      :fastpath_flood     => 'enable',
++    }
++    end
++    it do
++      should contain_file('/etc/n1kv/n1kv.conf') \
++        .with_content(/^fastpath-flood enable/)
++      should contain_file('/etc/n1kv/n1kv.conf') \
++        .without_content(/^fastpath-flood disable/)
++    end
++  end
++
+   context 'verify n1kv.conf with uplinks' do
+     let :params do
+     {
+diff --git a/neutron/templates/n1kv.conf.erb b/neutron/templates/n1kv.conf.erb
+index 8edb3e2..dd94094 100644
+--- a/neutron/templates/n1kv.conf.erb
++++ b/neutron/templates/n1kv.conf.erb
+@@ -81,6 +81,15 @@ virt <%= port%> profile <%= params['profile']%> mode static address <%= params['
+ # uvem-ovs-brname n1kvdvs
+ uvem-ovs-brname br-int
+ 
++# TAG: portdb
++# Description: PortDB (ovs|vem)
++# Optional: YES.
++# Default: ovs
++# restart_on_modify: Yes
++# Format:
++# portdb vem
++portdb <%= @portdb %>
++
+ # TAG: node-type
+ # Description: Type of Node: 'compute' (or) 'neutron'
+ # Optional: YES.
+@@ -150,3 +159,11 @@ node-type <%= @node_type %>
+ # restart_on_modify: Yes
+ # Format: dp-thread-socket-rrnglen <0..16384>
+ # Note: 0 - disables memory map I/O
++
++# TAG: fastpath-flood
++# Description: Enable flood of broadcast and unknown pkts in KLM
++# Optional: YES
++# Default: disable
++# restart_on_modify: Yes
++# Format: fastpath-flood <enable|disable>
++fastpath-flood <%= @fastpath_flood %>
diff --git a/0016-Changing-the-default-value-of-fastpath_flood-to-enab.patch b/0016-Changing-the-default-value-of-fastpath_flood-to-enab.patch
new file mode 100644
index 0000000..6fd5365
--- /dev/null
+++ b/0016-Changing-the-default-value-of-fastpath_flood-to-enab.patch
@@ -0,0 +1,79 @@
+From 71a5c90f92082fa84ee6c2bbaca39b2735fc3e1f Mon Sep 17 00:00:00 2001
+From: Dulanjalie Ganegedara <ddhanapa at cisco.com>
+Date: Wed, 25 Feb 2015 08:43:17 -0800
+Subject: [PATCH] Changing the default value of fastpath_flood to enable
+
+Current default value of fastpath_flood in nexus1000v is set to disable.
+Cisco1000v handles broadcast floods and unknown pkts in fastpath(KLM) by default.
+Thus this variable need to be set to enale as the default.
+
+Change-Id: If18ba553b70a896f0d9e38113831445bf3a08cbe
+Closes-Bug: 1425589
+(cherry picked from commit c90b465001b82005f656cc8af08e87111c884089)
+---
+ neutron/manifests/agents/n1kv_vem.pp                 |  4 ++--
+ neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb | 10 +++++-----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/neutron/manifests/agents/n1kv_vem.pp b/neutron/manifests/agents/n1kv_vem.pp
+index dc740c0..6366b41 100644
+--- a/neutron/manifests/agents/n1kv_vem.pp
++++ b/neutron/manifests/agents/n1kv_vem.pp
+@@ -97,7 +97,7 @@
+ #
+ # [*fastpath_flood*]
+ #   (optional) Handle broadcast floods and unknown pkts in fastpath(KLM)
+-#   Defaults to disable
++#   Defaults to enable
+ #
+ class neutron::agents::n1kv_vem (
+   $n1kv_vsm_ip          = '127.0.0.1',
+@@ -113,7 +113,7 @@ class neutron::agents::n1kv_vem (
+   $enable               = true,
+   $manage_service       = true,
+   $portdb               = 'ovs',
+-  $fastpath_flood       = 'disable'
++  $fastpath_flood       = 'enable'
+ ) {
+ 
+   include neutron::params
+diff --git a/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb b/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb
+index 4eeee17..68863ef 100644
+--- a/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb
++++ b/neutron/spec/classes/neutron_agents_n1kv_vem_spec.rb
+@@ -68,7 +68,7 @@ describe 'neutron::agents::n1kv_vem' do
+       :n1kv_vsm_domain_id => 900,
+       :host_mgmt_intf     => 'eth9',
+       :portdb             => 'ovs',
+-      :fastpath_flood     => 'disable'
++      :fastpath_flood     => 'enable'
+     }
+     end
+     it do
+@@ -87,7 +87,7 @@ describe 'neutron::agents::n1kv_vem' do
+       should contain_file('/etc/n1kv/n1kv.conf') \
+         .with_content(/^node-type compute/)
+       should contain_file('/etc/n1kv/n1kv.conf') \
+-        .with_content(/^fastpath-flood disable/)
++        .with_content(/^fastpath-flood enable/)
+     end
+   end
+ 
+@@ -122,14 +122,14 @@ describe 'neutron::agents::n1kv_vem' do
+   context 'verify fastpath_flood' do
+     let :params do
+     {
+-      :fastpath_flood     => 'enable',
++      :fastpath_flood     => 'disable',
+     }
+     end
+     it do
+       should contain_file('/etc/n1kv/n1kv.conf') \
+-        .with_content(/^fastpath-flood enable/)
++        .with_content(/^fastpath-flood disable/)
+       should contain_file('/etc/n1kv/n1kv.conf') \
+-        .without_content(/^fastpath-flood disable/)
++        .without_content(/^fastpath-flood enable/)
+     end
+   end
+ 
diff --git a/openstack-puppet-modules.spec b/openstack-puppet-modules.spec
index fdbc7ed..14dffa8 100644
--- a/openstack-puppet-modules.spec
+++ b/openstack-puppet-modules.spec
@@ -23,6 +23,8 @@ Patch0011: 0011-Configure-OVS-mechanism-agent-configs-in-its-config-.patch
 Patch0012: 0012-Create-resource-cache-upon-creation.patch
 Patch0013: 0013-Fix-rabbitmq-support.patch
 Patch0014: 0014-Switch-to-TLSv1-as-SSLv3-is-considered-insecure-and-.patch
+Patch0015: 0015-Adding-portdb-and-fastpath_flood-to-n1kv.conf.patch
+Patch0016: 0016-Changing-the-default-value-of-fastpath_flood-to-enab.patch
 
 BuildArch:      noarch
 Requires:       rubygem-json
@@ -49,6 +51,8 @@ OpenStack via installers using Puppet configuration tool.
 %patch0012 -p1
 %patch0013 -p1
 %patch0014 -p1
+%patch0015 -p1
+%patch0016 -p1
 
 find %{_builddir}/%{name}-%{version}/ -type f -name ".*" -exec rm {} +
 find %{_builddir}/%{name}-%{version}/ -size 0 -exec rm {} +


More information about the scm-commits mailing list