From ef7e56fa85d0c447b45ab696dc7e9b0cd94dd06b Mon Sep 17 00:00:00 2001 From: Xinyu Zhao Date: Wed, 30 Apr 2014 18:05:22 +0000 Subject: [PATCH] Add more logs for investigation on quantum issue https://bugs.launchpad.net/compass/+bug/1314742 Create network failed sometimes due to rpc timeout, so need to know where the delay is. Change-Id: I135d1153c6cf18e4fd2047e5f3e8c7ec61165936 --- chef/cookbooks/rsyslog/attributes/default.rb | 5 ++++- chef/cookbooks/rsyslog/recipes/client.rb | 22 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/chef/cookbooks/rsyslog/attributes/default.rb b/chef/cookbooks/rsyslog/attributes/default.rb index 73376e8..13180e9 100644 --- a/chef/cookbooks/rsyslog/attributes/default.rb +++ b/chef/cookbooks/rsyslog/attributes/default.rb @@ -33,5 +33,8 @@ default["rsyslog"]["cinderlog"] = {:"cinder-api"=>"/var/log/cinder/api.log", :"cinder-volume"=>"/var/log/cinder/volume.log"} default["rsyslog"]["quantumlog"] = {:"quantum-server"=>"/var/log/quantum/server.log", :"quantum-dhcp"=>"/var/log/quantum/dhcp-agent.log", - :"quantum-l3agent"=>"/var/log/quantum/l3-agent.log"} + :"quantum-l3agent"=>"/var/log/quantum/l3-agent.log", + :"quantum-ovsagent"=>"/var/log/quantum/openvswitch-agent.log"} default["rsyslog"]["keystonelog"] = {:"keystone"=>"/var/log/keystone/keystone.log"} +default["rsyslog"]["messaginglog"] = {:"rabbitmq"=>"/var/log/rabbitmq/rabbit\@#{node['hostname']}.log"} +default["rsyslog"]["mysqllog"] = {:"mysqld"=>"/var/log/mysqld.log"} diff --git a/chef/cookbooks/rsyslog/recipes/client.rb b/chef/cookbooks/rsyslog/recipes/client.rb index 49a6109..224a955 100644 --- a/chef/cookbooks/rsyslog/recipes/client.rb +++ b/chef/cookbooks/rsyslog/recipes/client.rb @@ -74,6 +74,28 @@ if roles.gsub("\n",",").strip =~ /os-network/ notifies :restart, "service[rsyslog]" end end +if roles.gsub("\n",",").strip =~ /os-ops-messaging/ + template "/etc/rsyslog.d/messaging.conf" do + source "openstack.conf.erb" + backup false + owner "root" + group "root" + mode 0644 + variables :loglist => node['rsyslog']['messaginglog'] + notifies :restart, "service[rsyslog]" + end +end +if roles.gsub("\n",",").strip =~ /os-ops-database/ + template "/etc/rsyslog.d/database.conf" do + source "openstack.conf.erb" + backup false + owner "root" + group "root" + mode 0644 + variables :loglist => node['rsyslog']['mysqllog'] + notifies :restart, "service[rsyslog]" + end +end file "/etc/rsyslog.d/server.conf" do action :delete