From 8fe5d2cc73f4ef2f85837ffcc5d8a68f1e871f8d Mon Sep 17 00:00:00 2001 From: SamSu <sam.su@huawei.com> Date: Thu, 27 Feb 2014 19:38:06 -0800 Subject: [PATCH] fixed several bugs in the Tsinghua project Change-Id: I063f49ec14407c6c87838f0e86434cfb47111a09 --- .../openstack-compute/templates/default/nova.conf.erb | 1 + chef/cookbooks/openstack-network/recipes/common.rb | 3 ++- .../openstack-network/recipes/openvswitch.rb | 7 +++++++ .../templates/default/quantum.conf.erb | 11 ++++++----- cobbler/snippets/ntp.conf | 6 ++++++ 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/chef/cookbooks/openstack-compute/templates/default/nova.conf.erb b/chef/cookbooks/openstack-compute/templates/default/nova.conf.erb index e2ac4b8..4845571 100644 --- a/chef/cookbooks/openstack-compute/templates/default/nova.conf.erb +++ b/chef/cookbooks/openstack-compute/templates/default/nova.conf.erb @@ -100,6 +100,7 @@ sql_connection=<%= @sql_connection %> sql_max_pool_size=30 sql_max_overflow=30 connection_type=libvirt +libvirt_inject_password=True libvirt_type=<%= node["openstack"]["compute"]["libvirt"]["virt_type"] %> # Command prefix to use for running commands as root (default: sudo) rootwrap_config=/etc/nova/rootwrap.conf diff --git a/chef/cookbooks/openstack-network/recipes/common.rb b/chef/cookbooks/openstack-network/recipes/common.rb index ea39b50..1d0deb3 100644 --- a/chef/cookbooks/openstack-network/recipes/common.rb +++ b/chef/cookbooks/openstack-network/recipes/common.rb @@ -101,7 +101,7 @@ end # rpc_backend quantum.openstack.common.rpc.impl_qpid" # It should be a bug of redhat OS execute "delete_auto_qpid" do - command %Q|sed -i "s/^rpc_backend = quantum.openstack.common.rpc.impl_qpid//g" /etc/quantum/quantum.conf| + command %Q|sed -i "s/^rpc_backend = quantum.openstack.common.rpc.impl_qpid//g" /etc/quantum/quantum.conf; sed -i "s/^qpid_hostname =//g" /etc/quantum/quantum.conf| only_if { (node['openstack']['mq']['service_type'] == "rabbitmq") and platform?(%w{fedora centos redhat}) @@ -109,6 +109,7 @@ execute "delete_auto_qpid" do action :nothing end + rabbit_server_role = node["openstack"]["network"]["rabbit_server_chef_role"] if node["openstack"]["network"]["rabbit"]["ha"] rabbit_hosts = rabbit_servers diff --git a/chef/cookbooks/openstack-network/recipes/openvswitch.rb b/chef/cookbooks/openstack-network/recipes/openvswitch.rb index 2d9efc2..7029a51 100644 --- a/chef/cookbooks/openstack-network/recipes/openvswitch.rb +++ b/chef/cookbooks/openstack-network/recipes/openvswitch.rb @@ -155,6 +155,13 @@ if not ["nicira", "plumgrid", "bigswitch"].include?(main_plugin) end end + +execute "force-start-openvswitch-agent" do + command "service #{platform_options['quantum_openvswitch_agent_service']} start" + action :run +end + + if node['openstack']['network']['disable_offload'] package "ethtool" do diff --git a/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb b/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb index 9d6528e..40463a5 100644 --- a/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb +++ b/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb @@ -43,6 +43,7 @@ bind_host = <%= node['openstack']['endpoints']['network-api']['host'] %> bind_port = <%= @bind_port %> sql_max_pool_size=50 +sqlalchemy_pool_size = 40 agent_down_time=10 @@ -104,15 +105,15 @@ api_paste_config = api-paste.ini # RPC configuration options. Defined in rpc __init__ # The messaging module to use, defaults to kombu. -# rpc_backend = quantum.openstack.common.rpc.impl_kombu +rpc_backend = quantum.openstack.common.rpc.impl_kombu # Size of RPC thread pool -# rpc_thread_pool_size = 64, +rpc_thread_pool_size = 64 # Size of RPC connection pool -# rpc_conn_pool_size = 30 +rpc_conn_pool_size = 30 # Seconds to wait for a response from call or multicall -# rpc_response_timeout = 60 +rpc_response_timeout = 60 # Seconds to wait before a cast expires (TTL). Only supported by impl_zmq. -# rpc_cast_timeout = 30 +rpc_cast_timeout = 30 # Modules of exceptions that are permitted to be recreated # upon receiving exception data from an rpc call. # allowed_rpc_exception_modules = quantum.openstack.common.exception, nova.exception diff --git a/cobbler/snippets/ntp.conf b/cobbler/snippets/ntp.conf index 0468434..acf5ba3 100644 --- a/cobbler/snippets/ntp.conf +++ b/cobbler/snippets/ntp.conf @@ -1,6 +1,12 @@ # For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). +# Include the option tinker panic 0 at the top of your ntp.conf file. +# By default, the NTP daemon sometimes panics and exits if the underlying clock +# appears to be behaving erratically. This option causes the daemon to keep +# running instead of panicking. +tinker panic 0 + driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not