From 1d5ce6d7bad2b24b706b994b780c2779dd82f07a Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 27 Feb 2014 13:29:23 -0600 Subject: [PATCH 1/3] added file to blank out rhel dist file in wrong place --- files/default/neutron-dist.conf | 1 + 1 file changed, 1 insertion(+) create mode 100644 files/default/neutron-dist.conf diff --git a/files/default/neutron-dist.conf b/files/default/neutron-dist.conf new file mode 100644 index 0000000..f5705cd --- /dev/null +++ b/files/default/neutron-dist.conf @@ -0,0 +1 @@ +# Your doing it wrong REDHAT! \ No newline at end of file From ad840206c0243928b2d69061bb92a7d0f6c27aa5 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 27 Feb 2014 13:33:10 -0600 Subject: [PATCH 2/3] updated neutron for better rhel support When using a rhel or rhel based system, the package installation of neutron, when installing via RDO, drops the file "/usr/share/neutron/neutron-dist.conf" which adds unexpected variables to the neutron configuration. The pull requests makes the file "/etc/neutron/neutron.conf" the one source of truth. To accomodate some additional configuration which was in service in the RHEL configuration file the following attributes were added. ``` default["neutron"]["database"]["max_overflow"] = 20 default["neutron"]["database"]["pool_timeout"] = 10 ``` These attributes mirror the openstack defaults from upstream neutron.conf example. --- attributes/default.rb | 4 +++- recipes/neutron-common.rb | 14 +++++++++++++- templates/default/neutron.conf.erb | 7 +++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index 17a8604..f63bd6e 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -82,7 +82,9 @@ default["neutron"]["notification"]["driver"] = "no_op" default["neutron"]["notification"]["topics"] = "notifications" -default["neutron"]["database"]["sqlalchemy_pool_size"] = 5 +default["neutron"]["database"]["sqlalchemy_pool_size"] = 10 +default["neutron"]["database"]["max_overflow"] = 20 +default["neutron"]["database"]["pool_timeout"] = 10 default["neutron"]["security_group_api"] = "neutron" default["neutron"]["isolated_metadata"] = "True" diff --git a/recipes/neutron-common.rb b/recipes/neutron-common.rb index e673916..b44c167 100644 --- a/recipes/neutron-common.rb +++ b/recipes/neutron-common.rb @@ -98,6 +98,7 @@ when "log" notification_driver = "neutron.openstack.common.notifier.log_notifier" else + notification_driver = nil msg = "#{notification_provider}, is not currently supported by these cookbooks." Chef::Application.fatal! msg end @@ -175,7 +176,10 @@ "lbaas_provider" => lbaas_provider, "fwaas_provider" => fwaas_provider, "vpnaas_provider" => vpnaas_provider, - "service_plugins" => service_plugins + "service_plugins" => service_plugins, + "sql_max_pool_size" => node["neutron"]["database"]["sqlalchemy_pool_size"], + "sql_max_overflow" => node["neutron"]["database"]["max_overflow"], + "sql_pool_timeout" => node["neutron"]["database"]["pool_timeout"] ) end @@ -223,4 +227,12 @@ link "/etc/neutron/plugin.ini" do to "/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini" end + + # RHEL YOUR DOING IT WRONG! + cookbook_file "/usr/share/neutron/neutron-dist.conf" do + source "neutron-dist.conf" + mode 0644 + owner "root" + group "neutron" + end end diff --git a/templates/default/neutron.conf.erb b/templates/default/neutron.conf.erb index 48fc3a9..7c7131f 100644 --- a/templates/default/neutron.conf.erb +++ b/templates/default/neutron.conf.erb @@ -2,6 +2,8 @@ root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf debug = <%= @neutron_debug %> verbose = <%= @neutron_verbose %> +lock_path = $state_path/lock + bind_host = <%= @neutron_ipaddress %> bind_port = <%= @neutron_port %> <% if @neutron_plugin == "ovs" %> @@ -41,6 +43,11 @@ agent_down_time = <%= @agent_down_time %> network_auto_schedule = False router_auto_schedule = False +[database] +max_pool_size = <%= @sql_max_pool_size %> +max_overflow = <%= @sql_max_overflow %> +pool_timeout = <%= @sql_pool_timeout %> + [AGENT] root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf polling_interval = 2 From b47ae03d9e54831de89d98030c6b1a4040a024b9 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 27 Feb 2014 21:38:02 -0600 Subject: [PATCH 3/3] fixed issue in RHEL when rootwrap.d does not exist --- recipes/neutron-vpnaas.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/neutron-vpnaas.rb b/recipes/neutron-vpnaas.rb index 15e3aef..5d9552f 100644 --- a/recipes/neutron-vpnaas.rb +++ b/recipes/neutron-vpnaas.rb @@ -50,6 +50,14 @@ ) end +# Create our root wrap directory +directory "/etc/neutron/rootwrap.d" do + action :create + owner "root" + group "neutron" + mode "755" +end + cookbook_file "/etc/neutron/rootwrap.d/vpnaas.filters" do source "vpnaas.filters" owner "root"