Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 903534

Summary: Unable to diff files from UI , displays message "Differences exist in a file that is not readable by all. Re-deployment of configuration file is recommended."
Product: [Community] Spacewalk Reporter: Neha <nerawat>
Component: ClientsAssignee: Stephen Herr <sherr>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.9CC: sashinde
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhncfg-5.10.40-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 18:34:55 UTC Type: Bug
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: 902787, 917805    
Attachments:
Description Flags
Proposed patch none

Description Neha 2013-01-24 09:09:36 UTC
Description of problem:

Not able to compare files from Graphical interface. Always display message  "Differences exist in a file that is not readable by all. Re-deployment of configuration file is recommended."

Version-Release number of selected component (if applicable):
rhncfg*-5.10.27-11.el5sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install rhncfg*-5.10.27-11.el5sat.noarch packages on client system.
2. System should be subscribed to a config channel and config file.
3. On clinet machine permission should be root:root 664 /root/test
4. Now try to shedule comparison from GUI - systemprofile -> configuration -> compare files
5. Run rhn_check -vvv on client machine.


Actual results:

Always display messgae "Differences exist in a file that is not readable by all. Re-deployment of configuration file is recommended."

  
Expected results:

Should display result of comparison.

Additional info:
This is a regression bug, GUI functionality is working correctly using rhncfg*-5.10.27-8.el6sat.noarch packages.

After debugging further, we can see the code belongs to this issue in /usr/share/rhn/config_common/file_utils.py -


128                 else:
129                     raise e
130         else:
131             result = ''.join(diff(path, temp_file))
132 

On line 131 is the code which is used to call the diff function with a src and dst. Here path which is the actual file on the client system is sent as SOURCE and temp_file is being set as DESTINATION.

If I swap the values on line 131 making the call as 
result = ''.join(diff(temp_file, path))
then the result of compare events scheduled by WEB UI works perfectly fine.

Comment 1 Tomas Lestach 2013-01-24 09:24:45 UTC
Resetting to 'Clients' component as the patch is for the rhncfg code.

Comment 2 Neha 2013-01-24 09:42:21 UTC
Created attachment 686604 [details]
Proposed patch

Comment 3 Stephen Herr 2013-01-29 00:04:09 UTC
Patch accepted, thanks!

Committing to Spacewalk master as: 2fc32eb0081d67a803731a301d960faa396ebd84

Comment 4 Stephen Herr 2013-03-01 17:07:31 UTC
Marking bug as ON_QA since tonight's build of Spacewalk nightly is a release candidate for Spacewalk 1.9.

Comment 5 Stephen Herr 2013-03-06 18:34:55 UTC
Spacewalk 1.9 has been released.

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes19