aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/en/sosreport.15
-rw-r--r--sos/plugins/__init__.py14
-rw-r--r--sos/sosreport.py50
3 files changed, 1 insertions, 68 deletions
diff --git a/man/en/sosreport.1 b/man/en/sosreport.1
index 4729762e..c153e73e 100644
--- a/man/en/sosreport.1
+++ b/man/en/sosreport.1
@@ -8,7 +8,7 @@ sosreport \- Generate debugging information for this system
[-e|--enable-plugins plugin-names]\fR
[-o|--only-plugins plugin-names]\fR
[-a|--alloptions] [-v|--verbose]\fR
- [--diagnose] [--analyze] [--report]\fR
+ [--analyze] [--report]\fR
[--config-file conf] [--batch]\fR
[--build] [--name name] [--no-colors]\fR
[--ticket-number number] [--debug]\fR
@@ -47,9 +47,6 @@ Upload the report to Red Hat (use exclusively if advised from a Red Hat support
.B \-v, \--verbose
Increase the verbosity of the output as sosreport is running. Multiple -v mean more verbosity.
.TP
-.B \--diagnose
-Turn on diagnostic functions
-.TP
.B \--analyze
Turn on analyzation functions
.TP
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 57a61acb..ff1c1ee7 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -128,7 +128,6 @@ class Plugin(object):
self.copiedFiles = []
self.executedCommands = []
- self.diagnose_msgs = []
self.alerts = []
self.customText = ""
self.optNames = []
@@ -540,13 +539,6 @@ class Plugin(object):
return outfn
- # For adding warning messages regarding configuration sanity
- def addDiagnose(self, alertstring):
- """Add a configuration sanity warning for this plugin. These will be
- displayed on-screen before collection and in the report as well.
- """
- self.diagnose_msgs.append(alertstring)
-
# For adding output
def addAlert(self, alertstring):
"""Add an alert to the collection of alerts for this plugin. These
@@ -620,12 +612,6 @@ class Plugin(object):
only if manually specified in the command line."""
return True
- def diagnose(self):
- """This method must be overridden to check the sanity of the system's
- configuration before the collection begins.
- """
- pass
-
def setup(self):
"""This method must be overridden to add the copyPaths, forbiddenPaths,
and external programs to be collected at a minimum.
diff --git a/sos/sosreport.py b/sos/sosreport.py
index 06c426f7..20c4287b 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -602,49 +602,6 @@ class SoSReport(object):
def _log_plugin_exception(self, plugin_name):
self.soslog.error("%s\n%s" % (plugin_name, traceback.format_exc()))
- def diagnose(self):
- tmpcount = 0
- for plugname, plug in self.loaded_plugins:
- try:
- plug.diagnose()
- except:
- if self.raise_plugins:
- raise
- else:
- self._log_plugin_exception(plugname)
-
- tmpcount += len(plug.diagnose_msgs)
- if tmpcount > 0:
- self.ui_log.info(_("One or more plugins have detected a problem in your "
- "configuration."))
- self.ui_log.info(_("Please review the following messages:"))
- self.ui_log.info("")
-
- fp = self.get_temp_file()
- for plugname, plug in self.loaded_plugins:
- for tmpcount2 in range(0, len(plug.diagnose_msgs)):
- if tmpcount2 == 0:
- soslog.warning("%s:" % plugname)
- soslog.warning(" * %s" % plug.diagnose_msgs[tmpcount2])
- fp.write("%s: %s\n" % (plugname, plug.diagnose_msgs[tmpcount2]))
- self.archive.add_file(fp.name, dest=os.path.join(self.rptdir, 'diagnose.txt'))
-
- self.ui_log.info("")
- if not self.opts.batch:
- try:
- while True:
- yorno = raw_input( _("Are you sure you would like to "
- "continue (y/n) ? ") )
- if yorno == _("y") or yorno == _("Y"):
- self.ui_log.info("")
- break
- elif yorno == _("n") or yorno == _("N"):
- self._exit(0)
- del yorno
- except KeyboardInterrupt:
- self.ui_log.info("")
- self._exit(0)
-
def prework(self):
try:
self.policy.preWork()
@@ -884,9 +841,6 @@ class SoSReport(object):
parser.add_option("--tmp-dir", action="store",
dest="tmp_dir",
help="specify alternate temporary directory", default=tempfile.gettempdir())
- parser.add_option("--diagnose", action="store_true",
- dest="diagnose",
- help="enable diagnostics", default=False)
parser.add_option("--analyze", action="store_true",
dest="analyze",
help="enable analyzations", default=False)
@@ -929,10 +883,6 @@ class SoSReport(object):
self.ensure_plugins()
self.batch()
-
- if self.opts.diagnose:
- self.diagnose()
-
self.prework()
self.setup()