|
|
629484 |
commit 19b479bb0686ff1079300f417505503f8ba8f3d5
|
|
|
629484 |
Author: Bryn M. Reeves <bmr@redhat.com>
|
|
|
629484 |
Date: Mon Feb 10 15:27:24 2014 +0000
|
|
|
629484 |
|
|
|
629484 |
Add distupgrade plugin
|
|
|
629484 |
|
|
|
629484 |
Add a new plugin to collect data relating to completed or
|
|
|
629484 |
attempted distribution upgrades. Currently supports the Red Hat
|
|
|
629484 |
set of tools and files but other distributions can supply their
|
|
|
629484 |
own filelists or override setup() to perform other distribution
|
|
|
629484 |
specific actions.
|
|
|
629484 |
|
|
|
629484 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
629484 |
|
|
|
629484 |
diff --git a/sos/plugins/distupgrade.py b/sos/plugins/distupgrade.py
|
|
|
629484 |
new file mode 100644
|
|
|
629484 |
index 0000000..b45d099
|
|
|
629484 |
--- /dev/null
|
|
|
629484 |
+++ b/sos/plugins/distupgrade.py
|
|
|
629484 |
@@ -0,0 +1,39 @@
|
|
|
629484 |
+## Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com>
|
|
|
629484 |
+
|
|
|
629484 |
+### This program is free software; you can redistribute it and/or modify
|
|
|
629484 |
+## it under the terms of the GNU General Public License as published by
|
|
|
629484 |
+## the Free Software Foundation; either version 2 of the License, or
|
|
|
629484 |
+## (at your option) any later version.
|
|
|
629484 |
+
|
|
|
629484 |
+## This program is distributed in the hope that it will be useful,
|
|
|
629484 |
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
629484 |
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
629484 |
+## GNU General Public License for more details.
|
|
|
629484 |
+
|
|
|
629484 |
+## You should have received a copy of the GNU General Public License
|
|
|
629484 |
+## along with this program; if not, write to the Free Software
|
|
|
629484 |
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
629484 |
+
|
|
|
629484 |
+import os
|
|
|
629484 |
+from sos.plugins import Plugin, RedHatPlugin
|
|
|
629484 |
+
|
|
|
629484 |
+class DistUpgrade(Plugin):
|
|
|
629484 |
+ """ Distribution upgrade data """
|
|
|
629484 |
+
|
|
|
629484 |
+ plugin_name = "distupgrade"
|
|
|
629484 |
+
|
|
|
629484 |
+ files = None
|
|
|
629484 |
+
|
|
|
629484 |
+ def setup(self):
|
|
|
629484 |
+ self.add_copy_specs(list(self.files))
|
|
|
629484 |
+
|
|
|
629484 |
+class RedHatDistUpgrade(DistUpgrade, RedHatPlugin):
|
|
|
629484 |
+
|
|
|
629484 |
+ files = (
|
|
|
629484 |
+ "/var/log/upgrade.log",
|
|
|
629484 |
+ "/var/log/redhat_update_tool.log",
|
|
|
629484 |
+ "/root/preupgrade/all-xccdf*",
|
|
|
629484 |
+ "/root/preupgrade/kickstart"
|
|
|
629484 |
+ )
|
|
|
629484 |
+
|
|
|
629484 |
+
|