Bug 609416

Summary: sealert -- ImportError: No module named bugzilla
Product: Red Hat Enterprise Linux 6 Reporter: Lubos Kocman <lkocman>
Component: setroubleshootAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: dgregor, dwalsh, gavin, jrieden, mgrepl, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: setroubleshoot-2.2.89-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:37:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580448    

Description Lubos Kocman 2010-06-30 08:54:21 UTC
Description of problem:

setroubleshoot/browser.py is trying to import module bugzilla.py which seems to be present only in mercurial package.

I don't believe that setting $PYTHONPATH and adding a dependency to mercurial is a right solution. So this module should be most probably shipped with setroubleshoot-server.



Version-Release number of selected component (if applicable):

clean installed RHEL 6.0-20100628 + fresh updates

setroubleshoot-server-2.2.86-1.el6.x86_64

How reproducible:


Hello dialog window "sealertError" with following text, appears each time when I'm logging to gnome.

-------------------------------------------------------------------------------
Opps, sealert hit an error!

Traceback (most recent call last):
  File "/usr/bin/sealert", line 978, in <module>
    run_as_dbus_service(username)
  File "/usr/bin/sealert", line 99, in run_as_dbus_service
    app = SEAlert(user, dbus_service.presentation_manager, watch_setroubleshootd=True)
  File "/usr/bin/sealert", line 599, in __init__
    from setroubleshoot.browser import BrowserApplet
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/browser.py", line 12, in <module>
    import bugzilla, xmlrpclib
ImportError: No module named bugzilla

-------------------------------------------------------------------------------
  
Actual results:


Expected results:


Additional info:


bash-4.1# find /usr -name bugzilla.py
/usr/lib64/python2.6/site-packages/hgext/bugzilla.py (mercurial)

bash-4.1$ sudo yum whatprovides */bugzilla.py
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
google-chrome/filelists                                  | 3.9 kB     00:00     
rhel/filelists_db                                        | 3.8 MB     00:03     
rhel-debuginfo/filelists_db                              | 3.8 MB     00:03     
rhel-optional/filelists_db                               | 1.7 MB     00:03     
rhts/filelists                                           |  76 kB     00:00     
mercurial-1.4-3.el6.x86_64 : A fast, lightweight distributed source control
                           : management system
Repo        : rhel
Matched from:
Filename    : /usr/lib64/python2.6/site-packages/hgext/bugzilla.py



mercurial-1.4-3.el6.x86_64 : A fast, lightweight distributed source control
                           : management system
Repo        : installed
Matched from:
Filename    : /usr/lib64/python2.6/site-packages/hgext/bugzilla.py

Comment 1 Lubos Kocman 2010-06-30 09:15:24 UTC
Actually issue occurs, after clicking on sealert gnome-pane-icon while some avc denials were detected. Just to be clear.

Comment 2 Milos Malik 2010-07-01 10:06:18 UTC
Do you have python-bugzilla package installed? If I remove this package I get the same error message.

Comment 3 Lubos Kocman 2010-07-01 10:20:58 UTC
bash-4.1$ yum search python-bugzilla
Loaded plugins: refresh-packagekit, rhnplugin
*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
Warning: No matches found for: python-bugzilla
No Matches found

See workstation.repo attachment

Comment 8 Dennis Gregorovic 2010-07-01 13:07:40 UTC
python-bugzilla functionality got merged into the report package.  See bug #557578

Comment 9 Lubos Kocman 2010-07-02 12:17:07 UTC
Hi Dennis, I'm having report package installed, but it's not providing mentioned module.

report-0.17-1.el6.x86_64


bash-4.1$ sudo rpm -ql report | grep bugzilla
bash-4.1$

Comment 10 Gavin Romig-Koch 2010-07-02 13:51:12 UTC
Does anyone know what setroubleshoot-server does with python-bugzilla?  If it is actually reporting bugs - in the way that sealert or python-meh does, it needs to be using report rather than python-bugzilla.    

The conversation, leading up to the creation of bug#557578, was that the only package that needed (and required) python-bugzilla was report.  We were trying to reduce package counts in RHE6L, and were asking if I could remove the need for python-bugzilla from report.  Report only needs python-bugzilla during the RHEL beta, so I agreed to move the functionality of python-bugzilla that report needed during the beta directly into report, and python-bugzilla could be removed from the distro.  Report does not contain all the functionality of python-bugzilla, only what it needed.  And report will contain none of the python-bugzilla functionality once we pass RHEL6 beta.

It might make sense to set up some kind of test to make sure no other python module is useing python-bugzilla without requiring it, though i don't know how hard that is.

Comment 11 Miroslav Grepl 2010-07-02 17:11:35 UTC
Fixed in setroubleshoot-2.2.89-2.el6.

Comment 13 releng-rhel@redhat.com 2010-11-10 21:37:04 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.