From bmr at redhat.com Wed Apr 6 10:00:55 2011 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 06 Apr 2011 11:00:55 +0100 Subject: [sos-devel] [PATCH] detect FIPS mode and switch to sha256sum Message-ID: <4D9C39D7.9040009@redhat.com> Hi Folks, This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=689387 When operating in FIPS mode the md5 digest algorithm is forbidden and will cause an exception when generating the report checksum. Detect FIPS mode via /proc/sys/crypto/fips_enabled and switch to sha256. In future we should expose this as a command line / configuration file option (and factor out fipsModeEnabled() as a general routine). Regards, Bryn. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sos-bz689387-use-sha256-in-fips-mode.patch URL: From bmr at redhat.com Wed Apr 6 10:11:29 2011 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 06 Apr 2011 11:11:29 +0100 Subject: [sos-devel] [PATCH] fix parted and dumpe2fs output on s390 Message-ID: <4D9C3C51.6080106@redhat.com> Hi Folks, These patches resolve: https://bugzilla.redhat.com/show_bug.cgi?id=622784 The filesys plugin used hdparm to filter device lists fails on s390 since the utility is not present on that architecture. Switch to filtering by regular expression instead (backport of upstream r1000/r1001). The second patch removes some debug output that was left in the original. Regards, Bryn. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sos-bz622784-filesys-no-print-regex-debug.patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sos-bz622784-parted-dumpe2fs-s390.patch URL: From bmr at redhat.com Wed Apr 6 10:16:02 2011 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 06 Apr 2011 11:16:02 +0100 Subject: [sos-devel] [PATCH] detect FIPS mode and switch to sha256sum Message-ID: <4D9C3D62.5080007@redhat.com> Hi Folks, This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=689387 When operating in FIPS mode the md5 digest algorithm is forbidden and will cause an exception when generating the report checksum. Detect FIPS mode via /proc/sys/crypto/fips_enabled and switch to sha256. In future we should expose this as a command line / configuration file option (and factor out fipsModeEnabled() as a general routine). Regards, Bryn. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sos-bz689387-use-sha256-in-fips-mode.patch URL: From prc at redhat.com Wed Apr 6 18:03:16 2011 From: prc at redhat.com (Pierre Carrier) Date: Wed, 6 Apr 2011 19:03:16 +0100 Subject: [sos-devel] Migration to git Message-ID: Hello sos lovers, We just migrated the repository from svn to git. Write permissions to the svn repo should have been removed. Please visit http://git.fedorahosted.org/git/?p=sos.git;a=summary for more details. And that's one good reason to use git send-email for your contributions! Membership is managed through the gitsos FAS group: https://admin.fedoraproject.org/accounts/group/members/gitsos/* How could I not use this opportunity to point you to: http://git-scm.com/documentation In particular, you'll find the "SVN Crash Course" there! Regards, -- Pierre Carrier From akunysz at acunu.com Mon Apr 18 09:49:47 2011 From: akunysz at acunu.com (Adrien Kunysz) Date: Mon, 18 Apr 2011 10:49:47 +0100 Subject: [sos-devel] [PATCH] Update example plugin to reflect reality (almost). Message-ID: There is still room for improvement but at least it's not completely wrong and misleading anymore. --- Patch sent by Adrien Kunysz . Hello list! As per the git tradition, that's where one can put whatever one wants in the message but outside of the commit. Can someone have a look at the changes and confirm they make sense? Once I get a positive answer, I will add a Signed-off-by header and import in the git repo. We don't have a formalized contribution process *yet*, but the idea is to get every change approved by someone else before it gets in the git repo. If someone is interested into documenting a process (might involve some design decisions), please ping me and we'll work on that together! -- Pierre example_plugins/example.py | 45 ++++++++++++++++--------------------------- 1 files changed, 17 insertions(+), 28 deletions(-) diff --git a/example_plugins/example.py b/example_plugins/example.py index 1e65041..d4356d1 100755 --- a/example_plugins/example.py +++ b/example_plugins/example.py @@ -19,21 +19,18 @@ import sos.plugintools # Class name must be the same as file name and method names must not change class example(sos.plugintools.PluginBase): - """This is an example plugin for sos. Plugins gather, analyze, and report on various aspects - of system operation that are of interest. plugins are based on the PluginBase class, which - you should inspect if you wish to override any methods in your plugin. The methods of use - to plugin developers are: - collect() - use the functions sosCp and sosRunExe to gether information - analyze() - perform any special analysis you require beyond just saving the - information gathered by collect(). Use sosAlert() and sosAddCustomText() - to add information to the report. - report() - override this method if you wish to replace the default reporting + '''dummy example plugin''' + # Plugin developers want to override setup() from which they will call + # addCopySpec() to collect files and collectExtOutPut() to collect programs + # output. + # If you want to go fancy you may also want to override diagnose(), + # analyze() and postproc(). Have a look at the PluginBase definition + # for details. - All plugins will use collect(), some will use analyze(), few will override report() - """ - - # Add your options here, indicate whether they are slow to run, and set whether they are enabled by default - # Options are python dictionaries that conatin a short name, long description, speed, and whether they are enabled by default + # Add your options here, indicate whether they are slow to run, and set + # whether they are enabled by default + # Options are python dictionaries that contain a short name, + # long description, speed, and whether they are enabled by default optionList = [("init.d", 'Gathers the init.d directory', 'slow', 0), ('follicles', 'Gathers information about each follicle on every toe', 'slow', 0), ('color', 'Gathers toenail polish color', 'fast', 0)] @@ -41,9 +38,10 @@ class example(sos.plugintools.PluginBase): def setup(self): ''' First phase - Collect all the information we need. Directories are copied recursively. arbitrary commands may be - executed using the susRunExe method. Information is automatically saved, and - links are presented in the report to each file or directory which has been - copied to the saved tree. Also, links are provided to the output from each command. + executed using the collectExtOutput() method. Information is + automatically saved, and links are presented in the report to each + file or directory which has been copied to the saved tree. Also, links + are provided to the output from each command. ''' # Here's how to copy files and directory trees self.addCopySpec("/etc/hosts") @@ -58,14 +56,14 @@ class example(sos.plugintools.PluginBase): # Here's how to execute a command # you can save the path to the copied file for later analysis if desired # FIXME: Need to figure out how to do this - self.psCmdDstFileName = self.runExe("/bin/ps -ef") + self.psCmdDstFileName = self.collectExtOutput("/bin/ps -ef") return def analyze(self): ''' This is optional and need not be defined. If you wish to perform some analysis on either files that were gathered or on the output of commands, then save the filenames on the - destination file system when gathering that information in the collect() method + destination file system when gathering that information in the setup() method and use them here ''' # This is an example of opening and reading the output of a command that @@ -83,12 +81,3 @@ class example(sos.plugintools.PluginBase): # self.addAlert("This is an alert") return - -# def report(self): -# """ Usually, this doesn't even need to be defined, and you can inherit the -# base class, unless you want to replace what sosGetResults() -# does with your own custom report generator. If you are going to do that, have a good -# look at that method to see what it does. Custom text and alerts can still be added -# here using sosAddCustomText() and sosAddAlert() -# This method returns html that will be included inline in the report -# """ -- 1.7.0.4 From plambri at redhat.com Wed Apr 20 15:19:04 2011 From: plambri at redhat.com (Pierguido Lambri) Date: Wed, 20 Apr 2011 16:19:04 +0100 Subject: [sos-devel] Adding the output of "mkqdisk -L"? Message-ID: <4DAEF968.3080208@redhat.com> Hi all. In the last period I'm requesting a lot the output of the command: # mkqdisk -L to retrieve the status of the quorum disk on a cluster, especially on RHEL6. Is it possible to have it enabled by default and put it in the sos_commands/cluster directory? Thanks, Pier From bmr at redhat.com Wed Apr 20 15:33:48 2011 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 20 Apr 2011 16:33:48 +0100 Subject: [sos-devel] Adding the output of "mkqdisk -L"? In-Reply-To: <4DAEF968.3080208@redhat.com> References: <4DAEF968.3080208@redhat.com> Message-ID: <4DAEFCDC.3000800@redhat.com> On 04/20/2011 04:19 PM, Pierguido Lambri wrote: > Hi all. > > In the last period I'm requesting a lot the output of the command: > > # mkqdisk -L > > to retrieve the status of the quorum disk on a cluster, especially on RHEL6. > Is it possible to have it enabled by default and put it in the > sos_commands/cluster directory? This seems quite reasonable to me - probably should have included this some time ago. I'll let Pierre comment on it too but how about something like the patch at the foot of this mail? Regards, Bryn. diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py index 45bb23e..4ab81f5 100644 --- a/sos/plugins/cluster.py +++ b/sos/plugins/cluster.py @@ -79,6 +79,7 @@ class cluster(sos.plugintools.PluginBase): if rhelver is not 4: # 5+ self.collectExtOutput("cman_tool -a nodes") + self.collectExtOutput("mkqdisk -L") if rhelver is 5: self.collectExtOutput("group_tool -v") From bmr at redhat.com Wed Apr 20 15:38:37 2011 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 20 Apr 2011 16:38:37 +0100 Subject: [sos-devel] [PATCH] Update example plugin to reflect reality (almost). In-Reply-To: References: Message-ID: <4DAEFDFD.7010307@redhat.com> On 04/18/2011 10:49 AM, Adrien Kunysz wrote: > There is still room for improvement but at least it's not completely > wrong and misleading anymore. > --- > Patch sent by Adrien Kunysz . > > Hello list! > > As per the git tradition, that's where one can put whatever one wants in the message but outside of the commit. > > Can someone have a look at the changes and confirm they make sense? > > Once I get a positive answer, I will add a Signed-off-by header and import in the git repo. > > We don't have a formalized contribution process *yet*, but the idea is to get every change approved by someone else before it gets in the git repo. > If someone is interested into documenting a process (might involve some design decisions), please ping me and we'll work on that together! > Thanks for posting this Adrien. Ack to the content - this is definitely an improvement over the status quo and while I think we should be reviewing both the examples and guidelines (this won't take long as we don't really have any ;) for plugin authors I think this patch makes sense as an incremental improvement over the current example. Regards, Bryn. From plambri at redhat.com Wed Apr 20 15:41:26 2011 From: plambri at redhat.com (Pierguido Lambri) Date: Wed, 20 Apr 2011 16:41:26 +0100 Subject: [sos-devel] Adding the output of "mkqdisk -L"? In-Reply-To: <4DAEFCDC.3000800@redhat.com> References: <4DAEF968.3080208@redhat.com> <4DAEFCDC.3000800@redhat.com> Message-ID: <4DAEFEA6.6070206@redhat.com> On 04/20/2011 04:33 PM, Bryn M. Reeves wrote: > This seems quite reasonable to me - probably should have included this some time > ago. I'll let Pierre comment on it too but how about something like the patch at > the foot of this mail? > > Regards, > Bryn. > > diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py > index 45bb23e..4ab81f5 100644 > --- a/sos/plugins/cluster.py > +++ b/sos/plugins/cluster.py > @@ -79,6 +79,7 @@ class cluster(sos.plugintools.PluginBase): > > if rhelver is not 4: # 5+ > self.collectExtOutput("cman_tool -a nodes") > + self.collectExtOutput("mkqdisk -L") > > if rhelver is 5: > self.collectExtOutput("group_tool -v") If that easy, it would be perfect. If need testing, just ping me, I have a couple of rhel6 clusters ;) Pier From bmr at redhat.com Wed Apr 20 15:56:26 2011 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 20 Apr 2011 16:56:26 +0100 Subject: [sos-devel] Adding the output of "mkqdisk -L"? In-Reply-To: <4DAEFEA6.6070206@redhat.com> References: <4DAEF968.3080208@redhat.com> <4DAEFCDC.3000800@redhat.com> <4DAEFEA6.6070206@redhat.com> Message-ID: <4DAF022A.6060505@redhat.com> On 04/20/2011 04:41 PM, Pierguido Lambri wrote: > On 04/20/2011 04:33 PM, Bryn M. Reeves wrote: >> diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py >> index 45bb23e..4ab81f5 100644 >> --- a/sos/plugins/cluster.py >> +++ b/sos/plugins/cluster.py >> @@ -79,6 +79,7 @@ class cluster(sos.plugintools.PluginBase): >> >> if rhelver is not 4: # 5+ >> self.collectExtOutput("cman_tool -a nodes") >> + self.collectExtOutput("mkqdisk -L") >> >> if rhelver is 5: >> self.collectExtOutput("group_tool -v") > > If that easy, it would be perfect. > If need testing, just ping me, I have a couple of rhel6 clusters ;) Thanks! Here you go: http://people.redhat.com/breeves/packages/testing/sos/2.2/8.0.mkqdisk.el6/ If you could also open up a bugzilla against Rawhide/sos with a general explanation of why the feature is useful (and the other usual bug text) we'll use that to track this into upstream and can then clone that bug to get this included in the appropriate releases. Regards, Bryn. From prc at redhat.com Fri Apr 22 08:17:20 2011 From: prc at redhat.com (Pierre Carrier) Date: Fri, 22 Apr 2011 09:17:20 +0100 Subject: [sos-devel] [PATCH] Update example plugin to reflect reality (almost). In-Reply-To: <4DAEFDFD.7010307@redhat.com> References: <4DAEFDFD.7010307@redhat.com> Message-ID: <1DC3E1DF-F1CB-47DC-8D77-E66A8ACD1D85@redhat.com> Hello Adrien & list, On 20 Apr 2011, at 16:38, Bryn M. Reeves wrote: > Thanks for posting this Adrien. Ack to the content - this is definitely an > improvement over the status quo and while I think we should be reviewing both > the examples and guidelines (this won't take long as we don't really have any ;) > for plugin authors I think this patch makes sense as an incremental improvement > over the current example. Brilliant! For quite some time I thought that my mailer broke the patch formatting, but it turns out the original copy in my mailbox already doesn't apply as-is. As it's Acked-By, let's just get a new copy (git send-email and no broken smtp please, we'll need to document that), I'll get it in master. BR, -- Pierre Carrier From akunysz at acunu.com Fri Apr 22 08:30:27 2011 From: akunysz at acunu.com (Adrien Kunysz) Date: Fri, 22 Apr 2011 09:30:27 +0100 Subject: [sos-devel] [PATCH] Update example plugin to reflect reality (almost). Message-ID: <1303461027-18774-1-git-send-email-adk@acunu.com> There is still room for improvement but at least it's not completely wrong and misleading anymore. --- example_plugins/example.py | 45 ++++++++++++++++--------------------------- 1 files changed, 17 insertions(+), 28 deletions(-) diff --git a/example_plugins/example.py b/example_plugins/example.py index 1e65041..d4356d1 100755 --- a/example_plugins/example.py +++ b/example_plugins/example.py @@ -19,21 +19,18 @@ import sos.plugintools # Class name must be the same as file name and method names must not change class example(sos.plugintools.PluginBase): - """This is an example plugin for sos. Plugins gather, analyze, and report on various aspects - of system operation that are of interest. plugins are based on the PluginBase class, which - you should inspect if you wish to override any methods in your plugin. The methods of use - to plugin developers are: - collect() - use the functions sosCp and sosRunExe to gether information - analyze() - perform any special analysis you require beyond just saving the - information gathered by collect(). Use sosAlert() and sosAddCustomText() - to add information to the report. - report() - override this method if you wish to replace the default reporting + '''dummy example plugin''' + # Plugin developers want to override setup() from which they will call + # addCopySpec() to collect files and collectExtOutPut() to collect programs + # output. + # If you want to go fancy you may also want to override diagnose(), + # analyze() and postproc(). Have a look at the PluginBase definition + # for details. - All plugins will use collect(), some will use analyze(), few will override report() - """ - - # Add your options here, indicate whether they are slow to run, and set whether they are enabled by default - # Options are python dictionaries that conatin a short name, long description, speed, and whether they are enabled by default + # Add your options here, indicate whether they are slow to run, and set + # whether they are enabled by default + # Options are python dictionaries that contain a short name, + # long description, speed, and whether they are enabled by default optionList = [("init.d", 'Gathers the init.d directory', 'slow', 0), ('follicles', 'Gathers information about each follicle on every toe', 'slow', 0), ('color', 'Gathers toenail polish color', 'fast', 0)] @@ -41,9 +38,10 @@ class example(sos.plugintools.PluginBase): def setup(self): ''' First phase - Collect all the information we need. Directories are copied recursively. arbitrary commands may be - executed using the susRunExe method. Information is automatically saved, and - links are presented in the report to each file or directory which has been - copied to the saved tree. Also, links are provided to the output from each command. + executed using the collectExtOutput() method. Information is + automatically saved, and links are presented in the report to each + file or directory which has been copied to the saved tree. Also, links + are provided to the output from each command. ''' # Here's how to copy files and directory trees self.addCopySpec("/etc/hosts") @@ -58,14 +56,14 @@ class example(sos.plugintools.PluginBase): # Here's how to execute a command # you can save the path to the copied file for later analysis if desired # FIXME: Need to figure out how to do this - self.psCmdDstFileName = self.runExe("/bin/ps -ef") + self.psCmdDstFileName = self.collectExtOutput("/bin/ps -ef") return def analyze(self): ''' This is optional and need not be defined. If you wish to perform some analysis on either files that were gathered or on the output of commands, then save the filenames on the - destination file system when gathering that information in the collect() method + destination file system when gathering that information in the setup() method and use them here ''' # This is an example of opening and reading the output of a command that @@ -83,12 +81,3 @@ class example(sos.plugintools.PluginBase): # self.addAlert("This is an alert") return - -# def report(self): -# """ Usually, this doesn't even need to be defined, and you can inherit the -# base class, unless you want to replace what sosGetResults() -# does with your own custom report generator. If you are going to do that, have a good -# look at that method to see what it does. Custom text and alerts can still be added -# here using sosAddCustomText() and sosAddAlert() -# This method returns html that will be included inline in the report -# """ -- 1.7.0.4 From prc at redhat.com Fri Apr 22 09:50:11 2011 From: prc at redhat.com (Pierre Carrier) Date: Fri, 22 Apr 2011 10:50:11 +0100 Subject: [sos-devel] [PATCH] Update example plugin to reflect reality (almost). In-Reply-To: <1303461027-18774-1-git-send-email-adk@acunu.com> References: <1303461027-18774-1-git-send-email-adk@acunu.com> Message-ID: <967D4E50-FCD8-4A73-A2AF-12D922BB15B4@redhat.com> On 22 Apr 2011, at 09:30, Adrien Kunysz wrote: > There is still room for improvement but at least it's not completely > wrong and misleading anymore. Committed: https://fedorahosted.org/sos/changeset/144312b77dbe32d9225f3be20931f64a84412557 BR, -- Pierre Carrier, Technical Support Engineer Production Support, EMEA office Global Support Services Red Hat, Inc. From plambri at redhat.com Wed Apr 27 12:44:36 2011 From: plambri at redhat.com (Pierguido Lambri) Date: Wed, 27 Apr 2011 13:44:36 +0100 Subject: [sos-devel] Adding the output of "mkqdisk -L"? In-Reply-To: <4DAF022A.6060505@redhat.com> References: <4DAEF968.3080208@redhat.com> <4DAEFCDC.3000800@redhat.com> <4DAEFEA6.6070206@redhat.com> <4DAF022A.6060505@redhat.com> Message-ID: <4DB80FB4.7070302@redhat.com> On 04/20/2011 04:56 PM, Bryn M. Reeves wrote: > Thanks! Here you go: > > http://people.redhat.com/breeves/packages/testing/sos/2.2/8.0.mkqdisk.el6/ > > If you could also open up a bugzilla against Rawhide/sos with a general > explanation of why the feature is useful (and the other usual bug text) we'll > use that to track this into upstream and can then clone that bug to get this > included in the appropriate releases. Sorry, I just completely forgot about it. I've created the bugzilla #700092. Tell me if something is missing. I'll try the new sosreport package. Thanks Pier