Bug 221850 - setroubleshoot fails to find and load plugins
setroubleshoot fails to find and load plugins
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: setroubleshoot (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-08 10:33 EST by dex
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: setroubleshoot-1_8_14-1_fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-16 00:06:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
startup errors from /var/log/messages (35.04 KB, text/plain)
2007-01-08 10:33 EST, dex
no flags Details
error messages (42.63 KB, text/plain)
2007-02-13 05:04 EST, dex
no flags Details

  None (edit)
Description dex 2007-01-08 10:33:07 EST
Description of problem:
this version and the one before fails to start cleanly complaining of missing
plugins which appear to be intact.

Version-Release number of selected component (if applicable)
setroubleshoot-1.8.12-1.fc7

How reproducible:
install version

Steps to Reproduce:
1. yum install setroubleshoot
2.
3.
  
Actual results:
install success

Expected results:
no errors in messages. 

Additional info:
/var/log/messages attached

Some recent history I removed setroubleshoot with yum remove before the python
2.5 update then tried to put it back after the python update was in but then
this started happening in the logs. 
util.py looks guilty here not-sure why thou.

thnx

...dex
Comment 1 dex 2007-01-08 10:33:07 EST
Created attachment 145061 [details]
startup errors from /var/log/messages
Comment 2 dex 2007-01-08 11:07:44 EST
(In reply to comment #1)
> Created an attachment (id=145061) [edit]
> startup errors from /var/log/messages
> 

setroubleshoot-1.8.13-1.fc7
same errors as before.
Comment 3 John Dennis 2007-01-11 18:17:56 EST
Thank you for reporting the problem.

The semantics of module importing changed between python 2.4 and python 2.5
which was causing our loading of our plugin's to fail with python 2.5. This
should be fixed in: setroubleshoot-1_8_14-1_fc7
Comment 4 dex 2007-01-12 13:36:57 EST
hi john 
I got my hands on setroubleshoot-1_8_14-1_fc7 now and this happend,

[root@dexterFC5t1 ~]# service setroubleshoot status
setroubleshootd is stopped                     <--stopped here due to this bug

[root@dexterFC5t1 ~]# service setroubleshoot start   <--restart
Starting setroubleshootd:                                  [  OK  ]
[root@dexterFC5t1 ~]# Traceback (most recent call last):
  File "/usr/sbin/setroubleshootd", line 71, in <module>
    from setroubleshoot.server import RunFaultServer
  File "/usr/lib/python2.5/site-packages/setroubleshoot/server.py", line 35, in
<module>
    from setroubleshoot.analyze import *
  File "/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 35, in
<module>
    from setroubleshoot.avc_audit import *
  File "/usr/lib/python2.5/site-packages/setroubleshoot/avc_audit.py", line 36,
in <module>
    from setroubleshoot.signature import AVC, AvcContext
  File "/usr/lib/python2.5/site-packages/setroubleshoot/signature.py", line 62,
in <module>
    from rhpl.translate import _
  File "/usr/lib/python2.5/site-packages/rhpl/__init__.py", line 41
    'PS3PF'    : 'PS3'
               ^
SyntaxError: invalid syntax

[root@dexterFC5t1 ~]# service setroubleshoot status
setroubleshootd dead but pid file exists
[root@dexterFC5t1 ~]# service setroubleshoot restart
Stopping setroubleshootd:                                  [FAILED]
Starting setroubleshootd:                                  [  OK  ]
[root@dexterFC5t1 ~]# Traceback (most recent call last):
  File "/usr/sbin/setroubleshootd", line 71, in <module>
    from setroubleshoot.server import RunFaultServer
  File "/usr/lib/python2.5/site-packages/setroubleshoot/server.py", line 35, in
<module>
    from setroubleshoot.analyze import *
  File "/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 35, in
<module>
    from setroubleshoot.avc_audit import *
  File "/usr/lib/python2.5/site-packages/setroubleshoot/avc_audit.py", line 36,
in <module>
    from setroubleshoot.signature import AVC, AvcContext
  File "/usr/lib/python2.5/site-packages/setroubleshoot/signature.py", line 62,
in <module>
    from rhpl.translate import _
  File "/usr/lib/python2.5/site-packages/rhpl/__init__.py", line 41
    'PS3PF'    : 'PS3'
               ^
SyntaxError: invalid syntax

So looking at file error:

File "/usr/lib/python2.5/site-packages/rhpl/__init__.py", line 41
    'PS3PF'    : 'PS3'
               ^
contains:
[.snip.]
39:		'Cell'     : 'pSeries',
40:		'Momentum' : 'pSeries'          <--error ',' missing
41:             'PS3PF'    : 'PS3'
42:             }

there is a ',' missing on the end of line 40 restoring this results in :

[root@dexterFC5t1 ~]# service setroubleshoot restart
Stopping setroubleshootd:                                  [FAILED]
Starting setroubleshootd:                                  [  OK  ]
[root@dexterFC5t1 ~]# service setroubleshoot status
setroubleshootd (pid 7985) is running...
[root@dexterFC5t1 ~]#

rhpl-0.200-1 was also updated today so this could be newly introduced.
I dont know what version of rhpl you tested setroubleshoot with but adding a ','
as above fixes all of this. 

thanks for comming
...dex

Comment 5 John Dennis 2007-01-12 14:26:51 EST
Thanks for reporting this, this bug was introduced with rhpl-0.200-1 and is not
setroubleshoot specific, it has been reported in bug #222442. As you observed it
the fix is trivial, it was just a missing comma after a new name was added to rhpl.
Comment 6 dex 2007-02-13 04:19:02 EST
this bug is back setroubleshoot-1.8.17-1.fc7
Comment 7 dex 2007-02-13 05:04:29 EST
Created attachment 147969 [details]
error messages
Comment 8 John Dennis 2007-02-13 09:49:24 EST
The failures in comment #7 are due to an unresolved dependency, setroubleshoot
is trying to import a module from another rpm which is not being found. It is
looking for avc.py which is in the policycoreutils rpm. Normally policycoreutils
installs it python files into python's site-packages directory. One possibility
for the promblem is python was upgraded from 2.4 to 2.5 which changes the
site-packages directory from 

/usr/lib/python2.4/site-packages
to
/usr/lib/python2.5/site-packages

The latest setroubleshoot package is based on python 2.5 which means it is
trying to load all its modules from the 2.5 site-packages. Could you check what
version of policycoreutils you have and whether avc.py is in either the 2.4 or
2.5 site-packages directories. This will help answer the question if we've got
an rpm dependency problem and where it's arising from.

Thanks.
Comment 9 John Dennis 2007-02-13 12:12:55 EST
Apparently avc.py was removed from policycoreutils and there was a build problem
with the new setroubleshoot rpm which failed to pick up the code change which
did the avc.py import. A new rpm is being built, reassigning to dwalsh.
Comment 10 Daniel Walsh 2007-02-13 13:55:24 EST
Fixed in setroubleshoot-1.8.18-1.fc7
Comment 11 dex 2007-02-26 11:27:54 EST
Ok it's indeed fixed but now I see these errors at start-up, errm if you want a
new bugzilla entry just shout which component thanks.

setroubleshoot-1.9.1-1.fc7
setroubleshoot-server-1.9.1-1.fc7

Feb 24 00:36:53 dexterFC5t1 setroubleshoot: [avc.ERROR] Plugin Exception
plugins.disable_trans  Traceback (most recent call last):   File
"/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 257, in
analyze_avc     report_receiver.report_problem(report)   File
"/usr/lib/python2.5/site-packages/setroubleshoot/server.py", line 138, in
report_problem     siginfo = super(AlertPluginReportReceiver,
self).report_problem(siginfo)   File
"/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 305, in
report_problem     siginfo.local_id=self.database.sigs.generate_local_id()  
File "/usr/lib/python2.5/site-packages/setroubleshoot/signature.py", line 1292,
in generate_local_id     return str(uuid.uuid4())   File
"/usr/lib/python2.5/site-packages/setroubleshoot/uuid.py", line 420, in uuid4  
  if _uuid_generate_random: NameError: global name '_uuid_generate_random' is
not defined
Feb 24 00:36:53 dexterFC5t1 setroubleshoot: [avc.ERROR] Plugin Exception
plugins.catchall_file  Traceback (most recent call last):   File
"/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 257, in
analyze_avc     report_receiver.report_problem(report)   File
"/usr/lib/python2.5/site-packages/setroubleshoot/server.py", line 138, in
report_problem     siginfo = super(AlertPluginReportReceiver,
self).report_problem(siginfo)   File
"/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 305, in
report_problem     siginfo.local_id=self.database.sigs.generate_local_id()  
File "/usr/lib/python2.5/site-packages/setroubleshoot/signature.py", line 1292,
in generate_local_id     return str(uuid.uuid4())   File
"/usr/lib/python2.5/site-packages/setroubleshoot/uuid.py", line 420, in uuid4  
  if _uuid_generate_random: NameError: global name '_uuid_generate_random' is
not defined
Feb 24 00:36:53 dexterFC5t1 setroubleshoot: [avc.ERROR] Plugin Exception
plugins.catchall  Traceback (most recent call last):   File
"/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 257, in
analyze_avc     report_receiver.report_problem(report)   File
"/usr/lib/python2.5/site-packages/setroubleshoot/server.py", line 138, in
report_problem     siginfo = super(AlertPluginReportReceiver,
self).report_problem(siginfo)   File
"/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 305, in
report_problem     siginfo.local_id=self.database.sigs.generate_local_id()  
File "/usr/lib/python2.5/site-packages/setroubleshoot/signature.py", line 1292,
in generate_local_id     return str(uuid.uuid4())   File
"/usr/lib/python2.5/site-packages/setroubleshoot/uuid.py", line 420, in uuid4  
  if _uuid_generate_random: NameError: global name '_uuid_generate_random' is
not defined
Comment 12 dex 2007-03-13 21:33:26 EDT
all cleared up thanks for comming :-)

setroubleshoot-server-1.9.3-1.fc7
setroubleshoot-1.9.3-1.fc7

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