Add ovs-dpctl-top tool for better troubleshooting

Nicira added a tool to emulate top for ovs-dpctl output
in this commit:

http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commit;h=14b4c575c28421d1181b509dbeae6e4849c7da69

This tool allows you to quickly, and in real time, get better insight
into what the traffic looks like on any given OVS node.

This is especially useful on L3 agent (logical router) nodes as it
will allow you to pinpoint trouble flows/links/ips which may be
causing bottlenecks or consuming an inordinate amount of CPU.

Change-Id: I54c9e6e86ce0942c206227b45123d17ca27109be
This commit is contained in:
Kevin Bringard 2013-10-07 10:08:49 -06:00
parent 1227b54039
commit e8c6ff46d4
3 changed files with 1719 additions and 0 deletions

1687
files/default/ovs-dpctl-top Normal file

File diff suppressed because it is too large Load Diff

View File

@ -137,3 +137,12 @@ if node['openstack']['network']['disable_offload']
notifies :start, "service[disable-eth-offload]"
end
end
# From http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=utilities/ovs-dpctl-top.in;h=f43fdeb7ab52e3ef642a22579036249ec3a4bc22;hb=14b4c575c28421d1181b509dbeae6e4849c7da69
cookbook_file "ovs-dpctl-top" do
path "/usr/bin/ovs-dpctl-top"
source "ovs-dpctl-top"
owner "root"
group "root"
mode "0755"
end

View File

@ -38,6 +38,29 @@ describe 'openstack-network::openvswitch' do
expect(@chef_run).to set_service_to_start_on_boot "quantum-plugin-openvswitch-agent"
end
describe "ovs-dpctl-top" do
before do
@file = @chef_run.cookbook_file "ovs-dpctl-top"
end
it "creates the ovs-dpctl-top file" do
expect(@chef_run).to create_file "/usr/bin/ovs-dpctl-top"
end
it "has the proper owner" do
expect(@file).to be_owned_by "root", "root"
end
it "has the proper mode" do
expect(sprintf("%o", @file.mode)).to eq "755"
end
it "has the proper interpreter line" do
expect(@chef_run).to create_file_with_content @file.name,
/^#!\/usr\/bin\/env python/
end
end
describe "ovs_quantum_plugin.ini" do
before do
@file = @chef_run.template "/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini"