Bug 731284 - "Compare all managed files to system" fails on RHEL4
Summary: "Compare all managed files to system" fails on RHEL4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 541
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Dimitar Yordanov
URL:
Whiteboard:
Depends On:
Blocks: sat54-blockers
TreeView+ depends on / blocked
 
Reported: 2011-08-17 09:11 UTC by David Swegen
Modified: 2018-11-15 09:58 UTC (History)
4 users (show)

Fixed In Version: rhncfg-5.9.27-18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-16 16:06:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to correct the issue (500 bytes, patch)
2011-08-17 09:11 UTC, David Swegen
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1315 0 normal SHIPPED_LIVE RHN Tools rhncfg bug fix update 2011-09-16 16:06:16 UTC

Description David Swegen 2011-08-17 09:11:47 UTC
Created attachment 518625 [details]
Patch to correct the issue

Description of problem:

5.4.1 seems to have introduced a bug when running the "Compare all managed files to system when run against RHEL4 (4.8 in this instance) clients:


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


How reproducible:

Every time


Steps to Reproduce:

In a system overview click on:

configuration -> overview -> Compare all managed files to system -> schedule compare

A scheduled comparison task will show up:
-----------------------------------------------------

Show differences between profiled config files and deployed config files 	07/26/11 11:28:48 AM CEST. AM CEST 	0 	0 	1 	

-----------------------------------------------------
Then I try to run a rhn_check to force the execution I get the following errors:

[root@acc3001 ~]# rhn_check
Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 345, in ?
    handle_action(action)
  File "/usr/sbin/rhn_check", line 218, in handle_action
    (status, message, data) = run_action(method, params)
  File "/usr/sbin/rhn_check", line 174, in run_action
    (status, message, data) = do_call(method, params)
  File "/usr/sbin/rhn_check", line 91, in do_call
    retval = apply(method, params)
  File "/usr/share/rhn/actions/configfiles.py", line 330, in diff
    diff = fp.diff(file)
  File "/usr/share/rhn/config_common/file_utils.py", line 105, in diff
    if not is_selinux_enabled():
NameError: global name 'is_selinux_enabled' is not defined


--------------------------------------
After repeating rhn_check a couple of times the scheduled task fails and you can find it in the failed tasks history.
  

Expected results:

The command should complete as expected, with no traceback


Additional info:

The attached patch corrects the problem.

Comment 1 Tomas Lestach 2011-08-17 13:53:14 UTC
client/tools/rhncfg/config_common/file_utils.py seems like a client issue ... reseting component.

Comment 10 Michael Mráka 2011-08-24 13:57:13 UTC
Backported to SATELLITE-5.4 as
commit 42559f026916ecb52d0073b58c01e311e20c7113
    731284 - is_selinux_enabled is not defined on RHEL4

Comment 13 Dimitar Yordanov 2011-09-15 08:49:32 UTC
Verified RHEL4

Comment 14 errata-xmlrpc 2011-09-16 16:06:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1315.html


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