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

Feature #10383
Signed-off-by: Arun Sharma <arun.sha...@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 92aa47b..cbcce6f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -6,6 +6,7 @@ Alexey I. Froloff       ra...@altlinux.org
 Andrew Evans            aev...@nicira.com
 Andrew Lambeth          w...@nicira.com
 Andy Southgate          andy.southg...@citrix.com
+Arun Sharma             arun.sha...@calsoftinc.com
 Ben Pfaff               b...@nicira.com
 Bryan Phillippe         b...@toroki.com
 Casey Barker            crbar...@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..771cd62
--- /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`
+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..6a38afe 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

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to