Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
adding more info in case of a suspected failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy McFadden committed Jun 11, 2015
1 parent b33798f commit ebff1eb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/storcli_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,16 @@ def report_as_html(self):

return (subject, body)

def dump_all_info(self, prefix="show-all-"):
"""Dumps the 'show all' command for controllers, enclosures, and
physical drives. This command will attempt to overwrite any file
in the current working directory matching
"<prefix>(controllers|enclosures|physicaldrives).txt"
"""
self._command("/call show all > %scontrollers.txt" % prefix)
self._command("/call/eall show all > %senclosures.txt" % prefix)
self._command("/call/eall/sall show all > %sphysicaldrives.txt" % prefix)


def parse_arguments(parser, logger, args=None):
(options, args) = parser.parse_args(args)
Expand Down Expand Up @@ -660,6 +670,10 @@ def init_parser():
result, errors = s.ok()

if not result or options.force:
# Store off as much info as we can
if not result:
s.dump_all_info()

zipdir = tempfile.mkdtemp()
log_path = os.path.abspath(os.path.join(zipdir, "logs.zip"))
flush_logfile(logger)
Expand Down

0 comments on commit ebff1eb

Please sign in to comment.