[ovs-dev] [PATCH v2] bugtool - Collect version information for all running Open vSwitch daemons.

Arun Sharma arun.sharma at calsoftinc.com
Wed Apr 4 20:23:19 UTC 2012


This is an improvement in {ovs|xen}-bugtool archive output to determine the
version which was running for all the OVS daemons. It is implemented as a
plugin which internally calls "ovs-appctl -t <daemon> version" command for
daemons whose pid file is present in /var/run/openvswitch directory.

Feature #10383
Signed-off-by: Arun Sharma <arun.sharma at calsoftinc.com>
---
 AUTHORS                                            |    1 +
 debian/openvswitch-common.install                  |    1 +
 utilities/bugtool/automake.mk                      |    3 +-
 utilities/bugtool/ovs-bugtool-daemons-ver          |   25 ++++++++++++++++++++
 .../plugins/system-configuration/openvswitch.xml   |    1 +
 xenserver/README                                   |    9 ++++++-
 6 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100755 utilities/bugtool/ovs-bugtool-daemons-ver

diff --git a/AUTHORS b/AUTHORS
index 324c4ba..7b00dde 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -6,6 +6,7 @@ Alexey I. Froloff       raorn at altlinux.org
 Andrew Evans            aevans at nicira.com
 Andrew Lambeth          wal at nicira.com
 Andy Southgate          andy.southgate at citrix.com
+Arun Sharma             arun.sharma at calsoftinc.com
 Ben Pfaff               blp at nicira.com
 Bryan Phillippe         bp at toroki.com
 Casey Barker            crbarker at google.com
diff --git a/debian/openvswitch-common.install b/debian/openvswitch-common.install
index 597fb8d..1805582 100644
--- a/debian/openvswitch-common.install
+++ b/debian/openvswitch-common.install
@@ -9,3 +9,4 @@ usr/share/openvswitch/bugtool-plugins
 usr/share/openvswitch/scripts/ovs-bugtool-cfm-show
 usr/share/openvswitch/scripts/ovs-bugtool-lacp-show
 usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show
+usr/share/openvswitch/scripts/ovs-bugtool-daemons-ver
diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk
index 9e625ce..e3ba0ad 100644
--- a/utilities/bugtool/automake.mk
+++ b/utilities/bugtool/automake.mk
@@ -15,7 +15,8 @@ bugtool_scripts = \
 	utilities/bugtool/ovs-bugtool-cfm-show \
 	utilities/bugtool/ovs-bugtool-lacp-show \
 	utilities/bugtool/ovs-bugtool-tc-class-show \
-	utilities/bugtool/ovs-bugtool-ovsdb-dump
+	utilities/bugtool/ovs-bugtool-ovsdb-dump \
+	utilities/bugtool/ovs-bugtool-daemons-ver
 scripts_SCRIPTS += $(bugtool_scripts)
 
 bugtoolpluginsdir = $(pkgdatadir)/bugtool-plugins
diff --git a/utilities/bugtool/ovs-bugtool-daemons-ver b/utilities/bugtool/ovs-bugtool-daemons-ver
new file mode 100755
index 0000000..672e7e1
--- /dev/null
+++ b/utilities/bugtool/ovs-bugtool-daemons-ver
@@ -0,0 +1,25 @@
+#! /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) 2012 Nicira Networks.
+
+for f in `cd /var/run/openvswitch/; ls *.pid 2>/dev/null`
+do
+    if [ -n "${f%.pid}" ]; then
+        ovs-appctl -t "${f%.pid}" version 2>&1
+    fi
+    echo
+done
diff --git a/utilities/bugtool/plugins/system-configuration/openvswitch.xml b/utilities/bugtool/plugins/system-configuration/openvswitch.xml
index 84373d5..260e6dc 100644
--- a/utilities/bugtool/plugins/system-configuration/openvswitch.xml
+++ b/utilities/bugtool/plugins/system-configuration/openvswitch.xml
@@ -18,4 +18,5 @@
 
 <collect>
     <command label="timezone">date --rfc-3339=seconds</command>
+    <command label="ovs-daemons-ver">/usr/share/openvswitch/scripts/ovs-bugtool-daemons-ver</command>
 </collect>
diff --git a/xenserver/README b/xenserver/README
index c626a92..4efdc37 100644
--- a/xenserver/README
+++ b/xenserver/README
@@ -89,7 +89,10 @@ debugging.  The sources for the extensions are in
     system-configuration/openvswitch.xml
 
         Collect system configuration information relevant to Open vSwitch,
-        including timezone.
+        including timezone. Runs the following script which is described
+        below:
+
+            * ovs-bugtool-daemons-ver
 
     system-configuration.xml
 
@@ -118,6 +121,10 @@ scripts are located in ../utilities/bugtool:
 
         Script to dump tc class configuration for all network interfaces.
 
+    ovs-bugtool-daemons-ver
+
+        Script to dump version information for all Open vSwitch daemons.
+
 ----------------------------------------------------------------------
 Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
 
-- 
1.7.2.5




More information about the dev mailing list