From: Arun Sharma Date: Wed, 4 Apr 2012 20:23:19 +0000 (-0700) Subject: bugtool - Collect version information for all running Open vSwitch daemons. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2af1e9dd995420730a334a610d53e381d259e54;p=openvswitch bugtool - Collect version information for all running Open vSwitch daemons. 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 version" command for daemons whose pid file is present in /var/run/openvswitch directory. Feature #10383 Signed-off-by: Arun Sharma [blp@nicira.com updated debian/copyright.in] Signed-off-by: Ben Pfaff --- diff --git a/AUTHORS b/AUTHORS index 324c4ba7..7b00dde1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,7 @@ Alexey I. Froloff raorn@altlinux.org Andrew Evans aevans@nicira.com Andrew Lambeth wal@nicira.com Andy Southgate andy.southgate@citrix.com +Arun Sharma arun.sharma@calsoftinc.com Ben Pfaff blp@nicira.com Bryan Phillippe bp@toroki.com Casey Barker crbarker@google.com diff --git a/debian/copyright.in b/debian/copyright.in index 40b794fe..c81db07e 100644 --- a/debian/copyright.in +++ b/debian/copyright.in @@ -56,6 +56,7 @@ License: utilities/bugtool/ovs-bugtool-cfm-show utilities/bugtool/ovs-bugtool-lacp-show utilities/bugtool/ovs-bugtool-tc-class-show + utilities/bugtool/ovs-bugtool-daemons-ver utilities/bugtool/plugins/kernel-info/openvswitch.xml utilities/bugtool/plugins/network-status/openvswitch.xml utilities/bugtool/plugins/system-configuration.xml diff --git a/debian/openvswitch-common.install b/debian/openvswitch-common.install index 597fb8d6..1805582c 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 9e625cee..e3ba0ad9 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 00000000..672e7e1b --- /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 84373d5f..260e6dc8 100644 --- a/utilities/bugtool/plugins/system-configuration/openvswitch.xml +++ b/utilities/bugtool/plugins/system-configuration/openvswitch.xml @@ -18,4 +18,5 @@ date --rfc-3339=seconds + /usr/share/openvswitch/scripts/ovs-bugtool-daemons-ver diff --git a/xenserver/README b/xenserver/README index c626a928..4efdc379 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.