From 7a35bf89e26ca0834cb3d4c09be2e0e75d30803a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 6 Jul 2011 10:26:57 -0700 Subject: [PATCH] ovs-bugtool: Add an OVSDB snapshot to ovs-bugtool output. The ovs-bugtool output already includes a copy of the configuration database file, but this file omits many instantaneous details. For example, it does not include any information about controller connection status or interface statistics. This commit adds a snapshot of the database contents that does include these details. --- utilities/bugtool/automake.mk | 4 +++- utilities/bugtool/ovs-bugtool-ovsdb-dump | 19 +++++++++++++++++++ .../plugins/network-status/openvswitch.xml | 1 + xenserver/openvswitch-xen.spec | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100755 utilities/bugtool/ovs-bugtool-ovsdb-dump diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk index 8cfbda2b..1d4f94e1 100644 --- a/utilities/bugtool/automake.mk +++ b/utilities/bugtool/automake.mk @@ -8,7 +8,9 @@ bugtool_plugins = \ utilities/bugtool/plugins/system-configuration.xml \ utilities/bugtool/plugins/system-configuration/openvswitch.xml -bugtool_scripts = utilities/bugtool/ovs-bugtool-tc-class-show +bugtool_scripts = \ + utilities/bugtool/ovs-bugtool-tc-class-show \ + utilities/bugtool/ovs-bugtool-ovsdb-dump scripts_SCRIPTS += $(bugtool_scripts) bugtoolpluginsdir = $(sysconfdir)/openvswitch/bugtool-plugins diff --git a/utilities/bugtool/ovs-bugtool-ovsdb-dump b/utilities/bugtool/ovs-bugtool-ovsdb-dump new file mode 100755 index 00000000..9e4d6620 --- /dev/null +++ b/utilities/bugtool/ovs-bugtool-ovsdb-dump @@ -0,0 +1,19 @@ +#! /bin/sh + +# This library is free software; you can redistribute it and/or +# modify it under the terms of version 2.1 of the GNU Lesser General +# Public License as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA +# +# Copyright (C) 2011 Nicira Networks. + +ovsdb-client -f csv dump unix:/var/run/openvswitch/db.sock Open_vSwitch diff --git a/utilities/bugtool/plugins/network-status/openvswitch.xml b/utilities/bugtool/plugins/network-status/openvswitch.xml index 8b280aa2..1ae5d9d8 100644 --- a/utilities/bugtool/plugins/network-status/openvswitch.xml +++ b/utilities/bugtool/plugins/network-status/openvswitch.xml @@ -18,4 +18,5 @@ /usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show + /usr/share/openvswitch/scripts/ovs-bugtool-ovsdb-dump diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec index 2864e048..b959b4aa 100644 --- a/xenserver/openvswitch-xen.spec +++ b/xenserver/openvswitch-xen.spec @@ -350,7 +350,7 @@ exit 0 /usr/share/openvswitch/scripts/InterfaceReconfigureVswitch.py /usr/share/openvswitch/scripts/vif /usr/share/openvswitch/scripts/sysconfig.template -/usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show +/usr/share/openvswitch/scripts/ovs-bugtool-* /usr/share/openvswitch/scripts/ovs-save /usr/share/openvswitch/scripts/ovs-ctl /usr/share/openvswitch/scripts/ovs-lib.sh -- 2.30.2