debian: Modify ovs-bugtool to include collectd rrd logs
authorSajjad Lateef <slateef@nicira.com>
Thu, 13 Jan 2011 01:07:58 +0000 (17:07 -0800)
committerSajjad Lateef <slateef@nicira.com>
Thu, 13 Jan 2011 17:29:54 +0000 (09:29 -0800)
collectd is a utility that stores rrd logs in the directory
/var/lib/collectd/rrd/ by default. rrd logs are created when
collectd is configured to output logs in Round Robin Database
format.

With this change, ovs-bugtool will include collectd logs in the
output bundle from /var/lib/collectd/rrd.  The output bundle will
include all sub-directories of the specified collectd directory.

ovs-bugtool checks if a directory exists before it attempts to
include the directory contents in the output bundle. So, running
ovs-bugtool on a system that does not have collectd logs should
not negatively affect the behavior of ovs-bugtool.

AUTHORS
debian/ovs-bugtool

diff --git a/AUTHORS b/AUTHORS
index c57d43b1c844660120d05374a8b349d472a37309..183a8b3b590dda83bd8f5405dbc09f3c64ec3be8 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -23,6 +23,7 @@ Neil McKee              neil.mckee@inmon.com
 Paul Fazzone            pfazzone@nicira.com
 Reid Price              reid@nicira.com
 Romain Lenglet          romain.lenglet@berabera.info
+Sajjad Lateef           slateef@nicira.com
 Simon Horman            horms@verge.net.au
 Tetsuo NAKAGAWA         nakagawa@mxc.nes.nec.co.jp
 Thomas Lacroix          thomas.lacroix@citrix.com
@@ -64,7 +65,6 @@ Peter Balland           peter@nicira.com
 Ram Jothikumar          rjothikumar@nicira.com
 Rob Hoes                rob.hoes@citrix.com
 Roger Leigh             rleigh@codelibre.net
-Sajjad Lateef           slateef@nicira.com
 Sean Brady              sbrady@gtfservices.com
 Sebastian Andrzej Siewior  sebastian@breakpoint.cc
 Srini Seetharaman       seethara@stanford.edu
index 11d3acbcb2cc39c187a556cf937b7351b83a889b..6a435e60b66ab9b3eb4343ec8c47cc4e90eb7e5a 100755 (executable)
@@ -98,6 +98,7 @@ OPENVSWITCH_DEFAULT_SWITCH = '/etc/default/openvswitch-switch'
 OPENVSWITCH_DEFAULT_CONTROLLER = '/etc/default/openvswitch-controller'
 OPENVSWITCH_CONF_DB = '/etc/openvswitch/conf.db'
 OPENVSWITCH_VSWITCHD_PID = '/var/run/openvswitch/ovs-vswitchd.pid'
+COLLECTD_LOGS_DIR = '/var/lib/collectd/rrd'
 VAR_LOG_DIR = '/var/log/'
 X11_LOGS_DIR = VAR_LOG_DIR
 X11_LOGS_RE = re.compile(r'.*/Xorg\..*$')
@@ -181,6 +182,7 @@ CAP_XML_ELEMENT = 'capability'
 
 CAP_BLOBS                = 'blobs'
 CAP_BOOT_LOADER          = 'boot-loader'
+CAP_COLLECTD_LOGS        = 'collectd-logs'
 CAP_DISK_INFO            = 'disk-info'
 CAP_FIRSTBOOT            = 'firstboot'
 CAP_HARDWARE_INFO        = 'hardware-info'
@@ -220,6 +222,8 @@ def cap(key, pii=PII_MAYBE, min_size=-1, max_size=-1, min_time=-1,
 cap(CAP_BLOBS,               PII_NO,                    max_size=5*MB)
 cap(CAP_BOOT_LOADER,         PII_NO,                    max_size=3*KB,
     max_time=5)
+cap(CAP_COLLECTD_LOGS,       PII_MAYBE,                 max_size=50*MB,
+    max_time=5)
 cap(CAP_DISK_INFO,           PII_MAYBE,                 max_size=25*KB,
     max_time=20)
 cap(CAP_FIRSTBOOT,           PII_YES,   min_size=60*KB, max_size=80*KB)
@@ -448,6 +452,7 @@ exclude those logs from the archive.
     cmd_output(CAP_BOOT_LOADER, [LS, '-lR', '/boot'])
     cmd_output(CAP_BOOT_LOADER, [MD5SUM, BOOT_KERNEL, BOOT_INITRD], label='vmlinuz-initrd.md5sum')
 
+    tree_output(CAP_COLLECTD_LOGS, COLLECTD_LOGS_DIR)
     cmd_output(CAP_DISK_INFO, [FDISK, '-l'])
     file_output(CAP_DISK_INFO, [PROC_PARTITIONS, PROC_MOUNTS])
     file_output(CAP_DISK_INFO, [FSTAB])