commit 0470fafaf41b47be950d3ec8680e307caa075e0f Author: Bryn M. Reeves Date: Wed Jan 9 11:11:17 2013 +0000 Fix external command collection in devicemapper plugin The devicemapper module abuses the internal sosGetCommandOutput() helper. No plugin should need to use this (it is not imported into the plugin namespace). Make devicemapper use callExtProg() so that command execution failures are properly logged. Resolves: bz824378 diff --git a/sos/plugins/devicemapper.py b/sos/plugins/devicemapper.py index e69562b..fe2f6ce 100644 --- a/sos/plugins/devicemapper.py +++ b/sos/plugins/devicemapper.py @@ -14,19 +14,18 @@ import sos.plugintools import os -from sos.helpers import sosGetCommandOutput class devicemapper(sos.plugintools.PluginBase): """device-mapper related information (dm, lvm, multipath) """ - optionList = [("lvmdump", 'collect raw metadata from PVs', 'slow', False)] + optionList = [("lvmdump", 'collect an lvmdump', 'fast', False)] dmraidOptions = ['V','b','r','s','tay','rD'] def do_lvmdump(self): - """Collects raw metadata directly from the PVs using dd + """Calls the LVM2 lvmdump script to collect detailed diagnostic information """ - sosGetCommandOutput("lvmdump -d %s" % os.path.join(self.cInfo['dstroot'],"lvmdump")) + self.callExtProg("lvmdump -d %s" % os.path.join(self.cInfo['dstroot'],"lvmdump")) def setup(self): self.collectExtOutput("/sbin/dmsetup info -c")