Bug 1331270 - a non-existing plugin (directoryserver) was specified in the command line
Summary: a non-existing plugin (directoryserver) was specified in the command line
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: BaseOS QE - Apps
URL: https://github.com/sosreport/sos/issu...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-28 07:32 UTC by Viktor Ashirov
Modified: 2016-11-08 20:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-08 20:32:11 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Viktor Ashirov 2016-04-28 07:32:15 UTC
Description of problem:
sosreport lists plugin for Directory Server as directoryserver:
[root@rhel7ds ~]# sosreport -l | grep directory
 directoryserver      Directory Server

But when I try to use it, it says that it doesn't exists:
[root@rhel7ds ~]# sosreport -o directoryserver -v --batch

sosreport (version 3.2)

a non-existing plugin (directoryserver) was specified in the command line

Actually it can be used by name "ds":
[root@rhel7ds ~]# sosreport -o ds --batch

sosreport (version 3.2)

This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp/sos.pK7oB8 and may be provided to a Red Hat support
representative.

Any information provided to Red Hat will be treated in accordance with
the published support policies at:

  https://access.redhat.com/support/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.


 Setting up archive ...
 Setting up plugins ...
 Running plugins. Please wait ...

  Running 1/1: directoryserver...        

Creating compressed archive...

Your sosreport has been generated and saved in:
  /var/tmp/sosreport-rhel7ds.brq.redhat.com-20160428092954.tar.xz

The checksum is: 3d7cd8ed0af0f330f9df89bd898de10c

Please send this file to your support representative.



Version-Release number of selected component (if applicable):
sos-3.2-35.el7_2.3.noarch

Comment 2 Bryn M. Reeves 2016-04-28 12:04:14 UTC
Regression due to an incomplete name cleanup:

commit fbbb6ace22fe97928f78d0058559defeccc472cc
Author: Bryn M. Reeves <bmr>
Date:   Fri Apr 26 15:21:23 2013 +0100

    Clean up plug-in naming and set plugin_name for all plugin classes
    
    Clean up some plug-ins with non-conforming or undescriptive names,
    set plugin_name in all base plug-in classes to avoid <dist><plug>
    names appearing in reports and remove the obsolete amd plug-in.
    Rename several plug-ins:
    
     - rhn   -> satellite (also spacewalk)
     - i18n  -> internationalization
     - qpidd -> qpid
     - ftp   -> vsftpd
    
    Enforce pep8 style class names for all plug-in classes.
    
    Signed-off-by: Bryn M. Reeves <bmr>

The intent was to rename the plugin from 'ds' (a bit cryptic) to 'directoryserver', however the file name was not changed as required by the sos class loader.

Since we have been shipping with the 'ds' name all along I'd be open to fixing this by reverting the 'directoryserver' changes and going back to 'ds' - it's still a bit overly short but it keeps consistency with what we've been doing. Alternately we can just rename the file and the new name will work correctly.

Comment 3 Viktor Ashirov 2016-04-29 07:08:05 UTC
> Since we have been shipping with the 'ds' name all along I'd be open to
> fixing this by reverting the 'directoryserver' changes and going back to
> 'ds' - it's still a bit overly short but it keeps consistency with what
> we've been doing. Alternately we can just rename the file and the new name
> will work correctly.

I'm leaning towards 'ds' since it's shorter to type and there is an explanatory description.

Comment 4 Pavel Moravec 2016-05-07 10:17:49 UTC
Btw. same error was spotted for some other plugins as well:

sos/plugins/cs.py:    plugin_name = 'certificatesystem'
sos/plugins/ds.py:    plugin_name = 'directoryserver'
sos/plugins/hts.py:    plugin_name = 'hardwaretestsuite'
sos/plugins/subscription_manager.py:    plugin_name = 'subscription-manager'

I suggest changing plugin_name according to the filename (same change like directoryserver -> ds).

See upstream https://github.com/sosreport/sos/issues/811

Comment 5 Pavel Moravec 2016-11-08 20:32:11 UTC
This has been fixed in RHEL7.3 / sos errata [1] due to sos rebase [2]. I am closing the bugzilla - please test it and if some problem with the fix is found, reopen the BZ.

[1] https://rhn.redhat.com/errata/RHBA-2016-2380.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1293044


Note You need to log in before you can comment on or make changes to this bug.