From aruna at linux.vnet.ibm.com Fri Sep 5 04:36:58 2014 From: aruna at linux.vnet.ibm.com (Aruna Balakrishnaiah) Date: Fri, 05 Sep 2014 10:06:58 +0530 Subject: [sos-devel] [PATCH v2] sosreport: Accept commas, period and alphas in the case id In-Reply-To: <20140820084630.GA16714@localhost.localdomain> References: <20140819103604.21150.1903.stgit@aruna-ThinkPad-T420> <53F458A2.1000508@linux.vnet.ibm.com> <20140820084630.GA16714@localhost.localdomain> Message-ID: <54093DEA.5000004@linux.vnet.ibm.com> On Wednesday 20 August 2014 02:16 PM, Bryn M. Reeves wrote: > On Wed, Aug 20, 2014 at 01:43:22PM +0530, Aruna Balakrishnaiah wrote: >> If case_id is not the appropriate name, please suggest me >> the name I could use. > Thanks for taking the time to rework the patch and add the documentation > changes. > > I'm actually happy with that name, although as I said on GitHub, I think it > may make sense to support multiple synonyms for this attribute - they all > ultimately mean the same thing and it would mean that users of a particular > vendor's products can use the term that the vendor itself uses (or at least > something close). Allowing synonyms is a lot simpler to implement than > creating a mechanism to allow the policy to control the names of command > line options (which was the other option I'd considered). > > If there seems to be agreement from the other main developers I'll aim to > get this merged today. Bryn, Any updates on this? Regards, Aruna > > Regards, > Bryn. > >>> - parser.add_option("--ticket-number", action="store", >>> - dest="ticket_number", >>> - help="specify ticket number") >>> + parser.add_option("--case-id", action="store", >>> + dest="case_id", >>> + help="specify case id") >>> parser.add_option("--name", action="store", >>> dest="customer_name", >>> help="specify report name") From sbonazzo at redhat.com Fri Sep 5 08:30:19 2014 From: sbonazzo at redhat.com (Sandro Bonazzola) Date: Fri, 5 Sep 2014 10:30:19 +0200 Subject: [sos-devel] [PATCH 1/3] add jboss runtime configuration Message-ID: <1409905821-17126-1-git-send-email-sbonazzo@redhat.com> In oVirt 3.5 jboss runtime config changed location. Add to the report: /var/lib/ovirt-engine-reports/jboss_runtime/config/ |-- ovirt-engine-reportsd_history | |-- current | | `-- ovirt-engine-reportsd.v1.xml | |-- ovirt-engine-reportsd.boot.xml | |-- ovirt-engine-reportsd.initial.xml | |-- ovirt-engine-reportsd.last.xml | `-- snapshot |-- ovirt-engine-reportsd-logging.properties `-- ovirt-engine-reportsd.xml /var/lib/ovirt-engine/jboss_runtime/config/ |-- ovirt-engine_history | |-- current | | `-- ovirt-engine.v1.xml | |-- ovirt-engine.boot.xml | |-- ovirt-engine.initial.xml | |-- ovirt-engine.last.xml | `-- snapshot |-- ovirt-engine-logging.properties `-- ovirt-engine.xml Change-Id: I15864ef5197ec1c42f4a68445d5586847e595bc2 Signed-off-by: Sandro Bonazzola --- sos/plugins/ovirt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sos/plugins/ovirt.py b/sos/plugins/ovirt.py index 38bc542..23c91f0 100644 --- a/sos/plugins/ovirt.py +++ b/sos/plugins/ovirt.py @@ -98,7 +98,9 @@ class Ovirt(Plugin, RedHatPlugin): "/var/lib/ovirt-engine/setup-history.txt", "/var/lib/ovirt-engine/setup/answers", "/var/lib/ovirt-engine/external_truststore", - "/var/tmp/ovirt-engine/config" + "/var/tmp/ovirt-engine/config", + "/var/lib/ovirt-engine/jboss_runtime/config", + "/var/lib/ovirt-engine-reports/jboss_runtime/config" ]) def postproc(self): -- 1.8.3.1 From sbonazzo at redhat.com Fri Sep 5 08:30:20 2014 From: sbonazzo at redhat.com (Sandro Bonazzola) Date: Fri, 5 Sep 2014 10:30:20 +0200 Subject: [sos-devel] [PATCH 2/3] nit: fixing bad indentation In-Reply-To: <1409905821-17126-1-git-send-email-sbonazzo@redhat.com> References: <1409905821-17126-1-git-send-email-sbonazzo@redhat.com> Message-ID: <1409905821-17126-2-git-send-email-sbonazzo@redhat.com> Change-Id: I5f570416d8f80d79589bf93854ece1b307dc60ae Signed-off-by: Sandro Bonazzola --- sos/plugins/ovirt.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sos/plugins/ovirt.py b/sos/plugins/ovirt.py index 23c91f0..9c34cbf 100644 --- a/sos/plugins/ovirt.py +++ b/sos/plugins/ovirt.py @@ -163,10 +163,10 @@ class Ovirt(Plugin, RedHatPlugin): sensitive_keys = keys_opt key_list = [x for x in sensitive_keys.split(':') if x] for key in key_list: - self.do_path_regex_sub( - self.DB_PASS_FILES, - r'{key}=(.*)'.format(key=key), - r'{key}=********'.format(key=key) - ) + self.do_path_regex_sub( + self.DB_PASS_FILES, + r'{key}=(.*)'.format(key=key), + r'{key}=********'.format(key=key) + ) # vim: expandtab tabstop=4 shiftwidth=4 -- 1.8.3.1 From sbonazzo at redhat.com Fri Sep 5 08:30:21 2014 From: sbonazzo at redhat.com (Sandro Bonazzola) Date: Fri, 5 Sep 2014 10:30:21 +0200 Subject: [sos-devel] [PATCH 3/3] add ovirt-engine-reports config In-Reply-To: <1409905821-17126-1-git-send-email-sbonazzo@redhat.com> References: <1409905821-17126-1-git-send-email-sbonazzo@redhat.com> Message-ID: <1409905821-17126-3-git-send-email-sbonazzo@redhat.com> Add: /etc/ovirt-engine-reports |-- ovirt-engine-reports.conf.d | |-- 10-setup-jboss.conf | `-- 10-setup-protocols.conf `-- sso.properties to the report Change-Id: I2287258b9652aa9ebf7f60528c378f4eeb2179d3 Related-To: https://bugzilla.redhat.com/1086942 Signed-off-by: Sandro Bonazzola --- sos/plugins/ovirt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sos/plugins/ovirt.py b/sos/plugins/ovirt.py index 9c34cbf..8b528a7 100644 --- a/sos/plugins/ovirt.py +++ b/sos/plugins/ovirt.py @@ -87,6 +87,7 @@ class Ovirt(Plugin, RedHatPlugin): "/etc/ovirt-engine", "/etc/rhevm", "/etc/ovirt-engine-dwh", + "/etc/ovirt-engine-reports", "/var/log/ovirt-engine", "/var/log/ovirt-engine-dwh", "/var/log/ovirt-engine-reports", -- 1.8.3.1 From sbonazzo at redhat.com Fri Sep 5 08:34:09 2014 From: sbonazzo at redhat.com (Sandro Bonazzola) Date: Fri, 5 Sep 2014 10:34:09 +0200 Subject: [sos-devel] [PATCH] [ovirt_hosted_engine] new plugin for oVirt Message-ID: <1409906049-17814-1-git-send-email-sbonazzo@redhat.com> The oVirt Hosted Engine packages allow to run ovirt-engine inside a VM. This plugin provides info about the setup and the high availability daemons running such VM. Change-Id: I4380bbed5bab4dd7fd3472bf5d5d1265f1eed3e7 Signed-off-by: Sandro Bonazzola --- sos/plugins/ovirt_hosted_engine.py | 85 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sos/plugins/ovirt_hosted_engine.py diff --git a/sos/plugins/ovirt_hosted_engine.py b/sos/plugins/ovirt_hosted_engine.py new file mode 100644 index 0000000..3e8dc1e --- /dev/null +++ b/sos/plugins/ovirt_hosted_engine.py @@ -0,0 +1,85 @@ +# Copyright (C) 2014 Red Hat, Inc., Sandro Bonazzola + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +import glob + + +from sos.plugins import Plugin, RedHatPlugin + + +class OvirtHostedEngine(Plugin, RedHatPlugin): + """oVirt Hosted Engine related information""" + + packages = ( + 'ovirt-hosted-engine-setup', + 'ovirt-hosted-engine-ha', + ) + + plugin_name = 'ovirt_hosted_engine' + + SETUP_LOG_GLOB = '/var/log/ovirt-hosted-engine-setup/*.log' + HA_LOG_GLOB = '/var/log/ovirt-hosted-engine-ha/*.log' + + def setup(self): + self.limit = self.get_option('log_size') + + # Add configuration files + # Collecting the whole directory since it may contain branding + # configuration files or third party plugins configuration files + self.add_copy_specs(['/etc/ovirt-hosted-engine-setup.env.d/']) + + self.add_copy_specs([ + '/etc/ovirt-hosted-engine/answers.conf', + '/etc/ovirt-hosted-engine/hosted-engine.conf', + '/etc/ovirt-hosted-engine/vm.conf', + '/etc/ovirt-hosted-engine-ha/agent.conf', + '/etc/ovirt-hosted-engine-ha/agent-log.conf', + '/etc/ovirt-hosted-engine-ha/broker.conf', + '/etc/ovirt-hosted-engine-ha/broker-log.conf', + '/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt', + ]) + + all_setup_logs = glob.glob(self.SETUP_LOG_GLOB) + all_setup_logs.sort(reverse=True) + # Add latest ovirt-hosted-engine-setup log file + self.add_copy_spec(all_setup_logs[0]) + # Add older ovirt-hosted-engine-setup log files only if requested + if self.get_option('all_logs'): + self.add_copy_spec_limit( + self.SETUP_LOG_GLOB, + sizelimit=self.limit + ) + + self.add_copy_specs([ + '/var/log/ovirt-hosted-engine-ha/agent.log', + '/var/log/ovirt-hosted-engine-ha/broker.log', + ]) + # Add older ovirt-hosted-engine-ha log files only if requested + if self.get_option('all_logs'): + self.add_copy_spec_limit( + self.HA_LOG_GLOB, + sizelimit=self.limit, + ) + + # Add run-time status + self.add_cmd_outputs([ + 'hosted-engine --vm-status', + 'hosted-engine --check-liveliness', + ]) + + +# vim: expandtab tabstop=4 shiftwidth=4 -- 1.8.3.1 From bmr at redhat.com Fri Sep 5 11:54:31 2014 From: bmr at redhat.com (Bryn M. Reeves) Date: Fri, 5 Sep 2014 12:54:31 +0100 Subject: [sos-devel] [PATCH v2] sosreport: Accept commas, period and alphas in the case id In-Reply-To: <54093DEA.5000004@linux.vnet.ibm.com> References: <20140819103604.21150.1903.stgit@aruna-ThinkPad-T420> <53F458A2.1000508@linux.vnet.ibm.com> <20140820084630.GA16714@localhost.localdomain> <54093DEA.5000004@linux.vnet.ibm.com> Message-ID: <20140905115430.GB7433@localhost.localdomain> On Fri, Sep 05, 2014 at 10:06:58AM +0530, Aruna Balakrishnaiah wrote: > On Wednesday 20 August 2014 02:16 PM, Bryn M. Reeves wrote: > >If there seems to be agreement from the other main developers I'll aim to > >get this merged today. > > Bryn, > > Any updates on this? Sorry - I've been tied up with work on old releases lately. I think we're all in agreement for this change now. I'll review the changes again and get it merged once I have a bit of free time (the only change now iirc is to add the synonyms for --ticket-number as discussed in Issue #330). Regards, Bryn. From shenglsh at linux.vnet.ibm.com Wed Sep 10 05:34:47 2014 From: shenglsh at linux.vnet.ibm.com (Sheng Liu) Date: Wed, 10 Sep 2014 13:34:47 +0800 Subject: [sos-devel] [networking] add ethtool -d in networking plugin In-Reply-To: <20140709111913.GB32673@localhost.localdomain> References: <53B37852.5000003@linux.vnet.ibm.com> <53BD027E.4050106@linux.vnet.ibm.com> <20140709111913.GB32673@localhost.localdomain> Message-ID: <540FE2F7.3060302@linux.vnet.ibm.com> Hi Bryn: the user wanted to confirm some bug .Capturing the grcDump using the 'ethtoold -d' command would allow them to make that confirmation. Another method to capture the grcDump is through the NetXtreme II eDiag Diagnostic Utility. However, this utility could not to be used by customers. On 07/09/2014 07:19 PM, Bryn M. Reeves wrote: > On Wed, Jul 09, 2014 at 04:51:10PM +0800, Sheng Liu wrote: >> Subject: [networking] add ethtool -d in networking plugin >> Date: Wed, 02 Jul 2014 11:11:14 +0800 >> From: Sheng Liu >> To: sos-devel-request at redhat.com >> >> add ethtool -d command to networking plugin to collect more info. >> >> Signed-off-by: Sheng Liu > > Thanks for the submission. Can you explain a bit more why this is > valuable enough to collect by default? > > We've had some recent experience with the less common ethtool interfaces > that makes me think this may present a risk that outweighs the likely > rare occasions that it is useful for debugging. > > A bug in the qlcnic ETHTOOL_GSTRINGS ioctl causes severe memory > corruption during 'ethtool -S' on affected hardware. It's fixed upstream > but the possibility of this type of problem (which is more common in the > less frequently exercised ioctls) means we need very good justification > to add this to the default run for all users. > > I'll canvas around the network engineers that I know to see how > frequently this information might be useful but can you provide a more > detailed explanation of why you think it's valuable? If nothing else > for change like this that rationale should be included in the commit > message. > > Regards, > Bryn. > From aruna at linux.vnet.ibm.com Thu Sep 11 11:17:17 2014 From: aruna at linux.vnet.ibm.com (Aruna Balakrishnaiah) Date: Thu, 11 Sep 2014 16:47:17 +0530 Subject: [sos-devel] [PATCH] sosreport: Capture IBM Power RAID storage adapter configuration information Message-ID: <20140911111707.22162.95140.stgit@aruna-ThinkPad-T420> Capture information which helps in better understanding of IBM Power RAID storage adapter configuration. Since iprconfig is specific to power adding the relevant commands in powerpc plugin. Signed-off-by: Aruna Balakrishnaiah --- sos/plugins/powerpc.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py index c829a5f..4495ea5 100644 --- a/sos/plugins/powerpc.py +++ b/sos/plugins/powerpc.py @@ -16,6 +16,7 @@ # specific logs for Pseries, PowerNV platforms. import os +import re from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin @@ -58,9 +59,29 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "ppc64_cpu --dscr", "lscfg -vp", "lsmcode -A", - "lsvpd --debug" + "lsvpd --debug", + "iprconfig -c show-config", + "iprconfig -c show-alt-config", + "iprconfig -c show-arrays", + "iprconfig -c show-jbod-disks", + "iprconfig -c show-ioas", + "lsscsi -g" ]) + devices = [] + for line in os.popen("iprconfig -c show-ioas").readlines(): + temp = line.split(' ') + p = re.compile('sg') + if p.search(temp[0]): + devices.append(temp[0]) + + for device in devices: + self.add_cmd_output("iprconfig -c show-details %s" % (device,)) + + for line in os.popen("lsscsi -g | grep enclo").readlines(): + temp = re.split('\s+', line) + self.add_cmd_output("iprconfig -c query-ses-mode %s" % (temp[7],)) + if ispSeries: self.add_copy_specs([ "/proc/ppc64/lparcfg", From bmr at redhat.com Thu Sep 11 11:40:54 2014 From: bmr at redhat.com (Bryn M. Reeves) Date: Thu, 11 Sep 2014 12:40:54 +0100 Subject: [sos-devel] [PATCH] sosreport: Capture IBM Power RAID storage adapter configuration information In-Reply-To: <20140911111707.22162.95140.stgit@aruna-ThinkPad-T420> References: <20140911111707.22162.95140.stgit@aruna-ThinkPad-T420> Message-ID: <20140911114053.GE20505@localhost.localdomain> Hi Aruna, Thanks for the submission - see in-line for review comments. On Thu, Sep 11, 2014 at 04:47:17PM +0530, Aruna Balakrishnaiah wrote: > Capture information which helps in better understanding of > IBM Power RAID storage adapter configuration. Since iprconfig > is specific to power adding the relevant commands in powerpc plugin. > > Signed-off-by: Aruna Balakrishnaiah > --- > sos/plugins/powerpc.py | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) I think it may be better to put this into its own plugin. This is very much a storage-specific addition and we've been moving toward more fine grained plugins for a while. One reaon this will soon become even more important is Issue #247: https://github.com/sosreport/sos/issues/247 The current proposal is to tag plugins with 'profiles' to allow a user to select e.g. all storage-relevant data with: # sosreport --batch --profile=storage Having this in its own plugin makes that type of arrangement simpler. > diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py > index c829a5f..4495ea5 100644 > --- a/sos/plugins/powerpc.py > +++ b/sos/plugins/powerpc.py > @@ -16,6 +16,7 @@ > # specific logs for Pseries, PowerNV platforms. > > import os > +import re > from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin > > > @@ -58,9 +59,29 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): > "ppc64_cpu --dscr", > "lscfg -vp", > "lsmcode -A", > - "lsvpd --debug" > + "lsvpd --debug", > + "iprconfig -c show-config", > + "iprconfig -c show-alt-config", > + "iprconfig -c show-arrays", > + "iprconfig -c show-jbod-disks", > + "iprconfig -c show-ioas", > + "lsscsi -g" > ]) > > + devices = [] > + for line in os.popen("iprconfig -c show-ioas").readlines(): Need to use a Plugin API for this. E.g. Plugin::call_ext_prog(). Plugins should never call os.popen or subprocess APIs directly. > + temp = line.split(' ') > + p = re.compile('sg') > + if p.search(temp[0]): > + devices.append(temp[0]) > + > + for device in devices: > + self.add_cmd_output("iprconfig -c show-details %s" % (device,)) > + > + for line in os.popen("lsscsi -g | grep enclo").readlines(): Ditto for popen use here. It would be good to avoid lsscsi here if possible as it's already exec'ed several times in the scsi plugin. It also looks like the plugin will run iprconfig on every SCSI enclosure device; that may not be desirable and could be confusing for users with other types of enclosure attached. I think we can use data from /proc and /sys to identify the devices and restrict collection to just the intended IBM Power RAID devices. > + temp = re.split('\s+', line) > + self.add_cmd_output("iprconfig -c query-ses-mode %s" % (temp[7],)) Generally it would be better to document the format of what's being parsed here via comments; right now there's quite a bit of 'magic' here. E.g. temp[0], temp[7]. An example of the output being processed or an explanation of its structure is helpful as it gives people something to work with if something changes in the future and this code breaks. Regards, Bryn. From aruna at linux.vnet.ibm.com Fri Sep 12 09:10:08 2014 From: aruna at linux.vnet.ibm.com (Aruna Balakrishnaiah) Date: Fri, 12 Sep 2014 14:40:08 +0530 Subject: [sos-devel] [PATCH] sosreport: Capture IBM Power RAID storage adapter configuration information In-Reply-To: <20140911114053.GE20505@localhost.localdomain> References: <20140911111707.22162.95140.stgit@aruna-ThinkPad-T420> <20140911114053.GE20505@localhost.localdomain> Message-ID: <5412B870.9050106@linux.vnet.ibm.com> On Thursday 11 September 2014 05:10 PM, Bryn M. Reeves wrote: > Hi Aruna, > > Thanks for the submission - see in-line for review comments. > > On Thu, Sep 11, 2014 at 04:47:17PM +0530, Aruna Balakrishnaiah wrote: >> Capture information which helps in better understanding of >> IBM Power RAID storage adapter configuration. Since iprconfig >> is specific to power adding the relevant commands in powerpc plugin. >> >> Signed-off-by: Aruna Balakrishnaiah >> --- >> sos/plugins/powerpc.py | 23 ++++++++++++++++++++++- >> 1 file changed, 22 insertions(+), 1 deletion(-) > I think it may be better to put this into its own plugin. This is very > much a storage-specific addition and we've been moving toward more fine > grained plugins for a while. > > One reaon this will soon become even more important is Issue #247: > > https://github.com/sosreport/sos/issues/247 > > The current proposal is to tag plugins with 'profiles' to allow a user to > select e.g. all storage-relevant data with: > > # sosreport --batch --profile=storage > > Having this in its own plugin makes that type of arrangement simpler. > >> diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py >> index c829a5f..4495ea5 100644 >> --- a/sos/plugins/powerpc.py >> +++ b/sos/plugins/powerpc.py >> @@ -16,6 +16,7 @@ >> # specific logs for Pseries, PowerNV platforms. >> >> import os >> +import re >> from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin >> >> >> @@ -58,9 +59,29 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): >> "ppc64_cpu --dscr", >> "lscfg -vp", >> "lsmcode -A", >> - "lsvpd --debug" >> + "lsvpd --debug", >> + "iprconfig -c show-config", >> + "iprconfig -c show-alt-config", >> + "iprconfig -c show-arrays", >> + "iprconfig -c show-jbod-disks", >> + "iprconfig -c show-ioas", >> + "lsscsi -g" >> ]) >> >> + devices = [] >> + for line in os.popen("iprconfig -c show-ioas").readlines(): > Need to use a Plugin API for this. E.g. Plugin::call_ext_prog(). Plugins should > never call os.popen or subprocess APIs directly. > >> + temp = line.split(' ') >> + p = re.compile('sg') >> + if p.search(temp[0]): >> + devices.append(temp[0]) >> + >> + for device in devices: >> + self.add_cmd_output("iprconfig -c show-details %s" % (device,)) >> + >> + for line in os.popen("lsscsi -g | grep enclo").readlines(): > Ditto for popen use here. > > It would be good to avoid lsscsi here if possible as it's already exec'ed several > times in the scsi plugin. > > It also looks like the plugin will run iprconfig on every SCSI enclosure device; > that may not be desirable and could be confusing for users with other types of > enclosure attached. Bryn, lsscsi also lists the vendor details for every enclosure, probably it would be straight forward to compare that instead of going through /sys or /proc data. Will address all the comments in my v2. Regards, Aruna > > I think we can use data from /proc and /sys to identify the devices and restrict > collection to just the intended IBM Power RAID devices. > >> + temp = re.split('\s+', line) >> + self.add_cmd_output("iprconfig -c query-ses-mode %s" % (temp[7],)) > Generally it would be better to document the format of what's being parsed here > via comments; right now there's quite a bit of 'magic' here. E.g. temp[0], temp[7]. > > An example of the output being processed or an explanation of its structure is helpful > as it gives people something to work with if something changes in the future and > this code breaks. > > Regards, > Bryn. > From bmr at redhat.com Fri Sep 12 09:33:20 2014 From: bmr at redhat.com (Bryn M. Reeves) Date: Fri, 12 Sep 2014 10:33:20 +0100 Subject: [sos-devel] [PATCH] sosreport: Capture IBM Power RAID storage adapter configuration information In-Reply-To: <5412B870.9050106@linux.vnet.ibm.com> References: <20140911111707.22162.95140.stgit@aruna-ThinkPad-T420> <20140911114053.GE20505@localhost.localdomain> <5412B870.9050106@linux.vnet.ibm.com> Message-ID: <20140912093319.GC25306@localhost.localdomain> On Fri, Sep 12, 2014 at 02:40:08PM +0530, Aruna Balakrishnaiah wrote: > lsscsi also lists the vendor details for every enclosure, probably it would > be straight forward to compare that instead of going through /sys or /proc > data. lsscsi does its work by issuing SG_IO ioctls directly to the device. This means it cannot use information already cached by the kernel and on systems with hundreds or thousands of devices means that we are generating considerable load. This is the reason for trying to avoid additional calls to the utility. If there's really no way it can be done then we can consider it but I'm doubtful that that's the case. If you can let me know what you want to use to identify the devices I can try to help you come up with appropriate plugin code to do it. Regards, Bryn. From bmr at redhat.com Fri Sep 12 10:02:23 2014 From: bmr at redhat.com (Bryn M. Reeves) Date: Fri, 12 Sep 2014 11:02:23 +0100 Subject: [sos-devel] [PATCH v2] sosreport: Accept commas, period and alphas in the case id In-Reply-To: <20140819103604.21150.1903.stgit@aruna-ThinkPad-T420> References: <20140819103604.21150.1903.stgit@aruna-ThinkPad-T420> Message-ID: <20140912100222.GD25306@localhost.localdomain> On Tue, Aug 19, 2014 at 04:06:27PM +0530, Aruna Balakrishnaiah wrote: > sosreport does not accept commas, period and alphas in the case > id, the patch fixes the same. > > Change the ticket number field to case id as it now accepts > alpha numerals as well. > > Signed-off-by: Aruna Balakrishnaiah > --- > Changes from v1: > Update documentation > > man/en/sosreport.1 | 6 +++--- > sos/policies/__init__.py | 20 ++++++++++---------- > sos/sosreport.py | 20 ++++++++++---------- > 3 files changed, 23 insertions(+), 23 deletions(-) This patch does not apply to the current sos tree: $ git apply --index /tmp/p error: patch failed: man/en/sosreport.1:9 error: man/en/sosreport.1: patch does not apply error: patch failed: sos/policies/__init__.py:188 error: sos/policies/__init__.py: patch does not apply error: patch failed: sos/sosreport.py:216 error: sos/sosreport.py: patch does not apply Looking at the failure in man/en/sosreport.1 it's failing because the patch was made against a version that does not document the --compression-type option: [-a|--alloptions] [-v|--verbose]\fR [--report] [--config-file conf] [--batch]\fR [--build] [--name name] [--ticket-number number] [--debug] [--tmp-dir directory]\fR [-z|--compression-type method]\fR <<<<<< vs: [--report] [--config-file conf] [--batch]\fR - [--build] [--name name] [--ticket-number number] + [--build] [--name name] [--case-id id] [--debug] [--tmp-dir directory]\fR [--help]\fR When submitting patches you need to create them against an up-to-date tree. The compression type change to the man page was made back in early July: commit cea5ebfbeab7d486879b4eb10e6d8b855144f47b Author: Bryn M. Reeves Date: Thu Jul 10 19:19:45 2014 +0100 [docs] document -z, --compression-type in sosreport(1) Signed-off-by: Bryn M. Reeves And there are now numerous other changes in other parts of the tree. I can fix this up but we are currently focused on getting 3.2 out and I probably won't have time until after the release. If you can re-diff your patches against a current sos tree I'll try to get them merged sooner. Regards, Bryn. From notifications at travis-ci.org Sat Sep 13 22:18:40 2014 From: notifications at travis-ci.org (Travis CI) Date: Sat, 13 Sep 2014 22:18:40 +0000 Subject: [sos-devel] Passed: sosreport/sos#525 (bmr-profiles - 35ea3e8) In-Reply-To: Message-ID: <5414c2c038a40_28d60c78395@eef06ad4-b11f-4f99-8921-fca7ac94d5e4.mail> Build Update for sosreport/sos ------------------------------------- Build: #525 Status: Passed Duration: 1 minute and 1 second Commit: 35ea3e8 (bmr-profiles) Author: Bryn M. Reeves Message: [plugins] add initial profile tags to all plugins Add an initial profile tag list to each plugin base class. A tag list is a tuple of strings indicating the set of profiles that should select this plugin, e.g.: plugin_name = "qux" profiles = ('system', 'storage', 'foo) A follow up patch will add infrastructure to use these tag lists to allow the user to select a logically-related set of plugins by specifying a profile on the command line: # sosreport -v --batch --profile=storage Signed-off-by: Bryn M. Reeves View the changeset: https://github.com/sosreport/sos/commit/35ea3e873cbe View the full build log and details: https://travis-ci.org/sosreport/sos/builds/35225701 -- You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications -------------- next part -------------- An HTML attachment was scrubbed... URL: From aruna at linux.vnet.ibm.com Mon Sep 15 05:39:19 2014 From: aruna at linux.vnet.ibm.com (Aruna Balakrishnaiah) Date: Mon, 15 Sep 2014 11:09:19 +0530 Subject: [sos-devel] [PATCH v3] sosreport does not accept commas, period and alphas in the case Message-ID: <20140915053841.5782.30898.stgit@aruna-ThinkPad-T420> id, the patch fixes the same. Change the ticket number field to case id as it now accepts alpha numerals as well. Signed-off-by: Aruna Balakrishnaiah --- Changes from v2: Rebase the patch Changes from v1: Update documentation man/en/sosreport.1 | 6 +++--- sos/policies/__init__.py | 21 ++++++++++----------- sos/sosreport.py | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/man/en/sosreport.1 b/man/en/sosreport.1 index 8471dfb..3714da0 100644 --- a/man/en/sosreport.1 +++ b/man/en/sosreport.1 @@ -9,7 +9,7 @@ sosreport \- Collect and package diagnostic and support data [-o|--only-plugins plugin-names]\fR [-a|--alloptions] [-v|--verbose]\fR [--report] [--config-file conf] [--batch]\fR - [--build] [--name name] [--ticket-number number] + [--build] [--name name] [--case-id id] [--debug] [--tmp-dir directory]\fR [-z|--compression-type method]\fR [--help]\fR @@ -78,8 +78,8 @@ Generate archive without prompting for interactive input. .B \--name NAME Specify a name to be used for the archive. .TP -.B \--ticket-number NUMBER -Specify a ticket number to be used for archive +.B \--case-id NUMBER +Specify a case id to be used for archive .TP .B \--build Do not archive copied data. Causes sosreport to leave an uncompressed diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index 89bc676..0722ee9 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -152,7 +152,7 @@ No changes will be made to system configuration. modifying PATH in their own initializer.""" self._parse_uname() self.report_name = self.hostname - self.ticket_number = None + self.case_id = None self.package_manager = PackageManager() self._valid_subclasses = [] self.set_exec_path() @@ -198,8 +198,8 @@ No changes will be made to system configuration. This function should return the filename of the archive without the extension. """ - if self.ticket_number: - self.report_name += "." + self.ticket_number + if self.case_id: + self.report_name += "." + self.case_id return "sosreport-%s-%s" % (self.report_name, time.strftime("%Y%m%d%H%M%S")) @@ -395,8 +395,8 @@ class LinuxPolicy(Policy): def sanitize_report_name(self, report_name): return re.sub(r"[^-a-zA-Z.0-9]", "", report_name) - def sanitize_ticket_number(self, ticket_number): - return re.sub(r"[^0-9]", "", ticket_number) + def sanitize_case_id(self, case_id): + return re.sub(r"[^-a-z,A-Z.0-9]", "", case_id) def pre_work(self): # this method will be called before the gathering begins @@ -409,7 +409,7 @@ class LinuxPolicy(Policy): self.report_name = input(_("Please enter your first initial " "and last name [%s]: ") % localname) - self.ticket_number = input(_("Please enter the case number " + self.case_id = input(_("Please enter the case id " "that you are generating this " "report for: ")) self._print() @@ -423,13 +423,12 @@ class LinuxPolicy(Policy): if self.commons['cmdlineopts'].customer_name: self.report_name = self.commons['cmdlineopts'].customer_name - if self.commons['cmdlineopts'].ticket_number: - self.ticket_number = self.commons['cmdlineopts'].ticket_number + if self.commons['cmdlineopts'].case_id: + self.case_id = self.commons['cmdlineopts'].case_id self.report_name = self.sanitize_report_name(self.report_name) - if self.ticket_number: - self.ticket_number = self.sanitize_ticket_number( - self.ticket_number) + if self.case_id: + self.case_id = self.sanitize_case_id(self.case_id) if (self.report_name == ""): self.report_name = "default" diff --git a/sos/sosreport.py b/sos/sosreport.py index 95da037..84b5e54 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -217,7 +217,7 @@ class SoSOptions(object): _verify = False _quiet = False _debug = False - _ticket_number = "" + _case_id = "" _customer_name = "" _config_file = "" _tmp_dir = "" @@ -415,15 +415,15 @@ class SoSOptions(object): self._debug = value @property - def ticket_number(self): + def case_id(self): if self._options is not None: - return self._options.ticket_number - return self._ticket_number + return self._options.case_id + return self._case_id - @ticket_number.setter - def ticket_number(self, value): + @case_id.setter + def case_id(self, value): self._check_options_initialized() - self._ticket_number = value + self._case_id = value @property def customer_name(self): @@ -532,9 +532,9 @@ class SoSOptions(object): dest="debug", help="enable interactive debugging using the python " "debugger") - parser.add_option("--ticket-number", action="store", - dest="ticket_number", - help="specify ticket number") + parser.add_option("--case-id", action="store", + dest="case_id", + help="specify case id") parser.add_option("--name", action="store", dest="customer_name", help="specify report name") From aruna at linux.vnet.ibm.com Mon Sep 15 12:48:57 2014 From: aruna at linux.vnet.ibm.com (Aruna Balakrishnaiah) Date: Mon, 15 Sep 2014 18:18:57 +0530 Subject: [sos-devel] [RESEND PATCH v2] sosreport: Accept commas, period and alphas in the case id Message-ID: <20140915124824.29146.21407.stgit@aruna-ThinkPad-T420> sosreport does not accept commas, period and alphas in the case id, the patch fixes the same. Change the ticket number field to case id as it now accepts alpha numerals as well. Signed-off-by: Aruna Balakrishnaiah --- Changes from v2: Rebase the patch Changes from v1: Update documentation man/en/sosreport.1 | 6 +++--- sos/policies/__init__.py | 21 ++++++++++----------- sos/sosreport.py | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/man/en/sosreport.1 b/man/en/sosreport.1 index 8471dfb..3714da0 100644 --- a/man/en/sosreport.1 +++ b/man/en/sosreport.1 @@ -9,7 +9,7 @@ sosreport \- Collect and package diagnostic and support data [-o|--only-plugins plugin-names]\fR [-a|--alloptions] [-v|--verbose]\fR [--report] [--config-file conf] [--batch]\fR - [--build] [--name name] [--ticket-number number] + [--build] [--name name] [--case-id id] [--debug] [--tmp-dir directory]\fR [-z|--compression-type method]\fR [--help]\fR @@ -78,8 +78,8 @@ Generate archive without prompting for interactive input. .B \--name NAME Specify a name to be used for the archive. .TP -.B \--ticket-number NUMBER -Specify a ticket number to be used for archive +.B \--case-id NUMBER +Specify a case id to be used for archive .TP .B \--build Do not archive copied data. Causes sosreport to leave an uncompressed diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index 89bc676..0722ee9 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -152,7 +152,7 @@ No changes will be made to system configuration. modifying PATH in their own initializer.""" self._parse_uname() self.report_name = self.hostname - self.ticket_number = None + self.case_id = None self.package_manager = PackageManager() self._valid_subclasses = [] self.set_exec_path() @@ -198,8 +198,8 @@ No changes will be made to system configuration. This function should return the filename of the archive without the extension. """ - if self.ticket_number: - self.report_name += "." + self.ticket_number + if self.case_id: + self.report_name += "." + self.case_id return "sosreport-%s-%s" % (self.report_name, time.strftime("%Y%m%d%H%M%S")) @@ -395,8 +395,8 @@ class LinuxPolicy(Policy): def sanitize_report_name(self, report_name): return re.sub(r"[^-a-zA-Z.0-9]", "", report_name) - def sanitize_ticket_number(self, ticket_number): - return re.sub(r"[^0-9]", "", ticket_number) + def sanitize_case_id(self, case_id): + return re.sub(r"[^-a-z,A-Z.0-9]", "", case_id) def pre_work(self): # this method will be called before the gathering begins @@ -409,7 +409,7 @@ class LinuxPolicy(Policy): self.report_name = input(_("Please enter your first initial " "and last name [%s]: ") % localname) - self.ticket_number = input(_("Please enter the case number " + self.case_id = input(_("Please enter the case id " "that you are generating this " "report for: ")) self._print() @@ -423,13 +423,12 @@ class LinuxPolicy(Policy): if self.commons['cmdlineopts'].customer_name: self.report_name = self.commons['cmdlineopts'].customer_name - if self.commons['cmdlineopts'].ticket_number: - self.ticket_number = self.commons['cmdlineopts'].ticket_number + if self.commons['cmdlineopts'].case_id: + self.case_id = self.commons['cmdlineopts'].case_id self.report_name = self.sanitize_report_name(self.report_name) - if self.ticket_number: - self.ticket_number = self.sanitize_ticket_number( - self.ticket_number) + if self.case_id: + self.case_id = self.sanitize_case_id(self.case_id) if (self.report_name == ""): self.report_name = "default" diff --git a/sos/sosreport.py b/sos/sosreport.py index 95da037..84b5e54 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -217,7 +217,7 @@ class SoSOptions(object): _verify = False _quiet = False _debug = False - _ticket_number = "" + _case_id = "" _customer_name = "" _config_file = "" _tmp_dir = "" @@ -415,15 +415,15 @@ class SoSOptions(object): self._debug = value @property - def ticket_number(self): + def case_id(self): if self._options is not None: - return self._options.ticket_number - return self._ticket_number + return self._options.case_id + return self._case_id - @ticket_number.setter - def ticket_number(self, value): + @case_id.setter + def case_id(self, value): self._check_options_initialized() - self._ticket_number = value + self._case_id = value @property def customer_name(self): @@ -532,9 +532,9 @@ class SoSOptions(object): dest="debug", help="enable interactive debugging using the python " "debugger") - parser.add_option("--ticket-number", action="store", - dest="ticket_number", - help="specify ticket number") + parser.add_option("--case-id", action="store", + dest="case_id", + help="specify case id") parser.add_option("--name", action="store", dest="customer_name", help="specify report name") From bmr at redhat.com Tue Sep 16 09:17:04 2014 From: bmr at redhat.com (Bryn M. Reeves) Date: Tue, 16 Sep 2014 10:17:04 +0100 Subject: [sos-devel] [RESEND PATCH v2] sosreport: Accept commas, period and alphas in the case id In-Reply-To: <20140915124824.29146.21407.stgit@aruna-ThinkPad-T420> References: <20140915124824.29146.21407.stgit@aruna-ThinkPad-T420> Message-ID: <20140916091704.GB21419@localhost.localdomain> On Mon, Sep 15, 2014 at 06:18:57PM +0530, Aruna Balakrishnaiah wrote: > sosreport does not accept commas, period and alphas in the case > id, the patch fixes the same. > > Change the ticket number field to case id as it now accepts > alpha numerals as well. Thanks; I assume this is the version you wanted to submit (although it says 'v2' the previous 'v3' had a truncated description). The patch currently fails the pep8 test suite: $ .git/hooks/pre-commit checking pep8 conformance sos/policies/__init__.py:413:46: E127 continuation line over-indented for visual indent pep8: [FAILED] I'll fix this up for now but in future it's easier if problems like this are addressed before submitting (one advantage of using GitHub is that you can set up the Travis CI integration checks to run on all commits). Regards, Bryn. From aruna at linux.vnet.ibm.com Tue Sep 16 09:19:22 2014 From: aruna at linux.vnet.ibm.com (Aruna Balakrishnaiah) Date: Tue, 16 Sep 2014 14:49:22 +0530 Subject: [sos-devel] [RESEND PATCH v2] sosreport: Accept commas, period and alphas in the case id In-Reply-To: <20140916091704.GB21419@localhost.localdomain> References: <20140915124824.29146.21407.stgit@aruna-ThinkPad-T420> <20140916091704.GB21419@localhost.localdomain> Message-ID: <5418009A.9040300@linux.vnet.ibm.com> On Tuesday 16 September 2014 02:47 PM, Bryn M. Reeves wrote: > On Mon, Sep 15, 2014 at 06:18:57PM +0530, Aruna Balakrishnaiah wrote: >> sosreport does not accept commas, period and alphas in the case >> id, the patch fixes the same. >> >> Change the ticket number field to case id as it now accepts >> alpha numerals as well. > Thanks; I assume this is the version you wanted to submit (although > it says 'v2' the previous 'v3' had a truncated description). Yes true, Since it had a truncated description I had to resend it. > > The patch currently fails the pep8 test suite: > > $ .git/hooks/pre-commit > checking pep8 conformance > sos/policies/__init__.py:413:46: E127 continuation line over-indented for visual indent > pep8: [FAILED] > > I'll fix this up for now but in future it's easier if problems like > this are addressed before submitting (one advantage of using GitHub > is that you can set up the Travis CI integration checks to run on > all commits). Sure will take care of it from next time. Thanks for accepting the patch! Regards, Aruna > > Regards, > Bryn. > From notifications at travis-ci.org Tue Sep 16 20:09:32 2014 From: notifications at travis-ci.org (Travis CI) Date: Tue, 16 Sep 2014 20:09:32 +0000 Subject: [sos-devel] Broken: sosreport/sos#550 (master - 772d0fb) In-Reply-To: Message-ID: <541898fc6ddd0_2168aaa45173c4@0bb1eee2-fa23-4b45-bcf6-b41a463b95bf.mail> Build Update for sosreport/sos ------------------------------------- Build: #550 Status: Broken Duration: 1 minute and 50 seconds Commit: 772d0fb (master) Author: Bryn M. Reeves Message: [sosreport] profile listing improvements Add a listing of available profiles at the end of --list-plugins output and add plugin and profile counts to the output of both --list-plugins and --list-profiles. Also factor out some common code for formatting commas-separated multi-line lists. Signed-off-by: Bryn M. Reeves View the changeset: https://github.com/sosreport/sos/compare/fe3c416205b9...772d0fb1ab2c View the full build log and details: https://travis-ci.org/sosreport/sos/builds/35470858 -- You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at travis-ci.org Tue Sep 16 20:27:33 2014 From: notifications at travis-ci.org (Travis CI) Date: Tue, 16 Sep 2014 20:27:33 +0000 Subject: [sos-devel] Fixed: sosreport/sos#551 (master - a75101b) In-Reply-To: Message-ID: <54189d35ea60_213b10a44371ee@03eec88a-9002-4627-bf9c-2af73ee43205.mail> Build Update for sosreport/sos ------------------------------------- Build: #551 Status: Fixed Duration: 1 minute and 23 seconds Commit: a75101b (master) Author: Bryn M. Reeves Message: [sosreport] change description of non-default plugins Plugins are currently listed as 'not default' if the plugin's default_enabled() method evaluates to False: sendmail inactive sendmail service snmp inactive Simple network management protocol soundcard not default Sound devices squid inactive Squid caching proxy It sounds odd and it looks ugly in the plugin listing. Change the description to 'optional': sendmail inactive sendmail service snmp inactive Simple network management protocol soundcard optional Sound devices squid inactive Squid caching proxy Signed-off-by: Bryn M. Reeves View the changeset: https://github.com/sosreport/sos/compare/772d0fb1ab2c...a75101bf3278 View the full build log and details: https://travis-ci.org/sosreport/sos/builds/35472606 -- You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at travis-ci.org Wed Sep 17 09:18:13 2014 From: notifications at travis-ci.org (Travis CI) Date: Wed, 17 Sep 2014 09:18:13 +0000 Subject: [sos-devel] Passed: sosreport/sos#554 (3.2beta1 - 41f48b1) In-Reply-To: Message-ID: <541951d4802c8_295f5c229339f@429daed7-c53d-4d5a-9c08-e012dd7affaa.mail> Build Update for sosreport/sos ------------------------------------- Build: #554 Status: Passed Duration: 50 seconds Commit: 41f48b1 (3.2beta1) Author: Bryn M. Reeves Message: [sos] bump release to 3.2b1 Signed-off-by: Bryn M. Reeves View the changeset: https://github.com/sosreport/sos/commit/41f48b12ca57 View the full build log and details: https://travis-ci.org/sosreport/sos/builds/35517596 -- You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications -------------- next part -------------- An HTML attachment was scrubbed... URL: From bmr at redhat.com Wed Sep 17 11:05:21 2014 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 17 Sep 2014 12:05:21 +0100 Subject: [sos-devel] [RESEND PATCH v2] sosreport: Accept commas, period and alphas in the case id In-Reply-To: <5418009A.9040300@linux.vnet.ibm.com> References: <20140915124824.29146.21407.stgit@aruna-ThinkPad-T420> <20140916091704.GB21419@localhost.localdomain> <5418009A.9040300@linux.vnet.ibm.com> Message-ID: <20140917110520.GA15509@localhost.localdomain> On Tue, Sep 16, 2014 at 02:49:22PM +0530, Aruna Balakrishnaiah wrote: > >I'll fix this up for now but in future it's easier if problems like > >this are addressed before submitting (one advantage of using GitHub > >is that you can set up the Travis CI integration checks to run on > >all commits). > > Sure will take care of it from next time. > > Thanks for accepting the patch! Thanks for taking the time to submit it & work through the review comments. I'm glad we could get something done that should work for all users. Regards, Bryn. From aruna at linux.vnet.ibm.com Fri Sep 19 05:53:25 2014 From: aruna at linux.vnet.ibm.com (Aruna Balakrishnaiah) Date: Fri, 19 Sep 2014 11:23:25 +0530 Subject: [sos-devel] [PATCH v2] sosreport: Capture IBM Power RAID storage adapter configuration information Message-ID: <20140919055201.13489.67666.stgit@aruna-ThinkPad-T420> Capture information which helps in better understanding of IBM Power RAID storage adapter configuration. Since iprconfig is specific to power adding the relevant commands in powerpc plugin. Signed-off-by: Aruna Balakrishnaiah --- Since lsscsi lists all types of enclosures and we are interested just in IBM Power RAID enclosures have relyed on iprconfig results. /sys or /proc does not give enough information to determine if its a RAID enclosure or not. Changes from v1: Move this to a separate plugin Use call_ext_prog Use iprconfig results to parse sos/plugins/powerpc_iprconfig.py | 116 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sos/plugins/powerpc_iprconfig.py diff --git a/sos/plugins/powerpc_iprconfig.py b/sos/plugins/powerpc_iprconfig.py new file mode 100644 index 0000000..7d64bc5 --- /dev/null +++ b/sos/plugins/powerpc_iprconfig.py @@ -0,0 +1,116 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# This plugin enables collection of logs for Power systems + +import os +import re +from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin + +class iprconfig(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + """IBM Power RAID storage adapter configuration information + """ + + plugin_name = 'powerpc_iprconfig' + + def check_enabled(self): + return (self.policy().get_arch() == "ppc64") + + def setup(self): + try: + with open('/proc/cpuinfo', 'r') as fp: + contents = fp.read() + ispSeries = "pSeries" in contents + isPowerNV = "PowerNV" in contents + except: + ispSeries = False + isPowerNV = False + + if ispSeries or isPowerNV: + self.add_cmd_outputs([ + "iprconfig -c show-config", + "iprconfig -c show-alt-config", + "iprconfig -c show-arrays", + "iprconfig -c show-jbod-disks", + "iprconfig -c show-ioas", + ]) + + iprconfig_result = self.call_ext_prog("iprconfig -c show-ioas") + if not (iprconfig_result['status'] == 0): + return + + iprconfig_output = iprconfig_result['output'] + devices = [] + if iprconfig_output: + for line in iprconfig_output.splitlines(): + temp = line.split(' ') + p = re.compile('sg') + # temp[0] holds the device name + if p.search(temp[0]): + devices.append(temp[0]) + + for device in devices: + self.add_cmd_output("iprconfig -c show-details %s" % (device,)) + + # Look for IBM Power RAID enclosures (iprconfig lists them) + ipr_result = self.call_ext_prog("iprconfig -c show-config") + if not (ipr_result['status'] == 0): + return + +# iprconfig -c show-config +# Name PCI/SCSI Location Description Status +# ------ ------------------------- ------------------------- ----------------- +# 0005:60:00.0/0: PCI-E SAS RAID Adapter Operational +# sda 0005:60:00.0/0:0:0:0 Physical Disk Active +# sdb 0005:60:00.0/0:1:0:0 Physical Disk Active +# sdc 0005:60:00.0/0:2:0:0 Physical Disk Active +# sdd 0005:60:00.0/0:3:0:0 Physical Disk Active +# sde 0005:60:00.0/0:4:0:0 Physical Disk Active +# sdf 0005:60:00.0/0:5:0:0 Physical Disk Active +# 0005:60:00.0/0:8:0:0 Enclosure Active +# 0005:60:00.0/0:8:1:0 Enclosure Active + + ipr_output = ipr_result['output'] + if ipr_output: + for line in ipr_output.splitlines(): + if "Enclosure" in line: + temp = re.split('\s+', line) + # temp[1] holds the PCI/SCSI location + pci, scsi = temp[1].split('/') + altconfig_result = self.call_ext_prog("iprconfig -c " + "show-alt-config") + if not (altconfig_result['status'] == 0): + return + +# iprconfig -c show-alt-config +# Name Resource Path/Address Vendor Product ID Status +# ------ -------------------------- -------- ---------------- ----------------- +# sg9 0: IBM 57C7001SISIOA Operational +# sg0 0:0:0:0 IBM MBF2300RC Active +# sg1 0:1:0:0 IBM MBF2300RC Active +# sg2 0:2:0:0 IBM HUC106030CSS600 Active +# sg3 0:3:0:0 IBM HUC106030CSS600 Active +# sg4 0:4:0:0 IBM HUC106030CSS600 Active +# sg5 0:5:0:0 IBM HUC106030CSS600 Active +# sg7 0:8:0:0 IBM VSBPD6E4A 3GSAS Active +# sg8 0:8:1:0 IBM VSBPD6E4B 3GSAS Active + + altconfig_output = altconfig_result['output'] + if altconfig_output: + for line in altconfig_output.splitlines(): + if scsi in line: + temp = line.split(' ') + # temp[0] holds device name + self.add_cmd_output("iprconfig -c " + "query-ses-mode %s" % (temp[0],)) From notifications at travis-ci.org Tue Sep 30 17:42:32 2014 From: notifications at travis-ci.org (Travis CI) Date: Tue, 30 Sep 2014 17:42:32 +0000 Subject: [sos-devel] Passed: sosreport/sos#571 (3.2 - 7c5e32d) In-Reply-To: Message-ID: <542aeb861b968_2b4c1d2244910@80215a91-7a69-4ce9-bf41-1c591497f9d5.mail> Build Update for sosreport/sos ------------------------------------- Build: #571 Status: Passed Duration: 44 seconds Commit: 7c5e32d (3.2) Author: Bryn M. Reeves Message: [sos] bump version to 3.2 Signed-off-by: Bryn M. Reeves View the changeset: https://github.com/sosreport/sos/compare/e945c1c7f7cb^...7c5e32dbab2a View the full build log and details: https://travis-ci.org/sosreport/sos/builds/36694127 -- You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications -------------- next part -------------- An HTML attachment was scrubbed... URL: From bmr at redhat.com Tue Sep 30 17:48:38 2014 From: bmr at redhat.com (Bryn M. Reeves) Date: Tue, 30 Sep 2014 18:48:38 +0100 Subject: [sos-devel] [ANNOUNCE] sos-3.2 released Message-ID: <20140930174838.GC13549@localhost.localdomain> The sos team is pleased to announce the beta release of sos-3.2. This release includes a large number of enhancements and fixes, including: * Profiles for plugin selection * Improved log size limiting * File archiving enhancements and robustness improvements * Global plugin options: * `--verify`, `--log-size`, `--all-logs` * Better plugin descriptions * Improved journalctl log capture * PEP8 compliant code base * oVirt support improvements * New plugins: hpasm, ctdb, dbus, oVirt engine hosted, MongoDB, ActiveMQ, OpenShift 2.0, MegaCLI, FCoE, python, Ubuntu, NUMA, Team network driver, kpatch Tarball and Zip archives of the release are available from GitHub: https://github.com/sosreport/sos/releases/tag/3.2 Packages for supported distributions will be made available over the next couple of weeks. Please see the project pages and mailing list for further information. Regards, Bryn.