Bug 215108

Summary: Config Client diffs on directories get reported as missing
Product: Red Hat Satellite 5 Reporter: Partha Aji <paji>
Component: Configuration ManagementAssignee: Todd Sanders <tsanders>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satellite-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cperry, paji
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-05 22:51:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 215106    
Bug Blocks: 462714    

Description Partha Aji 2006-11-10 23:31:31 UTC
Scheduled Diff action on directories get reported as missing files...
.. i.e. if client has a directory /tmp/foo and the scheduled action compares a
file/directory from the server, the python script will not do a diff and instead
reports the directory as "missing files"..

1) On the command line 
%mkdir /tmp/foo
%ls -l /tmp/
drwxrwxr-x  2 paji    paji        4096 Nov 10 18:22 foo

2) Go to the SDC Configuration page for that system.. Select Add Files + create
 file.
3) Set the following values
File Type: Directory
Filename/Path: /tmp/foo
File Permissions Mode:755
User or User ID: root
Group or Group ID: root
4) Click on create configuration file
5) Go View/Modify Files + Local Sandbox
6) Select the directory you just added and click on "Copy Latest to System
Config Channel"
7) Click on Compare Files
8) Select the file you just copied and click on "Compare Files"
9) Select "Schedule configuration actions as soon as possible." and hit 
Schedule Compare..
10) On the commandline
%sudo /usr/sbin/rhn_check -vv
...............
...............
D: Sending back response (0, 'Files successfully diffed', {'missing_files':
['/tmp/bar']})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status:  (0, 'rpm database not modified since last update (or
package list recently updated)', {})

11) Notice - "D: Sending back response (0, 'Files successfully diffed',
{'missing_files': ['/tmp/bar']})"

The directory diff is reported as a missing file even though the directory
clearly exists...
%ls -l /tmp/
drwxrwxr-x  2 paji    paji        4096 Nov 10 18:22 foo


 What should have been reported was the fact that the user and group id are
different in directory from whats stored in the Local Override Channel.

Comment 1 Partha Aji 2006-11-10 23:35:16 UTC
The cause for this bug can be seen in the following code
/trunk/eng/client/rhncfg/actions/configfiles.py 's diff method.. (def diff(params))

    for file in files:
        path = file['path']
        if not os.path.isfile(path):
            missing_files.append(path)
            continue

Notice the check is for 
        if not os.path.isfile(path):
            missing_files.append(path)
            continue

It should have been
        if not os.path.exists(path):
            missing_files.append(path)
            continue


Comment 2 Red Hat Bugzilla 2007-04-12 01:42:16 UTC
User bnackash@redhat.com's account has been closed

Comment 3 Red Hat Bugzilla 2007-05-03 05:43:09 UTC
User wregglej@redhat.com's account has been closed

Comment 5 Clifford Perry 2011-01-05 22:51:11 UTC
The RHN Satellite 4.x and RHN Proxy 4.x products have reached their end of
life. Please see:

Satellite 4 EOL Errata
 - https://rhn.redhat.com/errata/RHSA-2011-0001.html

RHN Proxy 4 EOL Errata
 - https://rhn.redhat.com/errata/RHSA-2011-0002.html

This bugzilla was reported for an unspecified version of the product, but was created prior to the release of 5.x - as such we assume this bug was reported for the 4.x version of the product - which is no longer supported. 

https://access.redhat.com/support/policy/updates/satellite/
RHN Satellite and Proxy Server 5
General availability: 	June 26, 2007

We are closing this bugzilla out. If you feel this bug report should be
reviewed again since it is valid for a currently supported product version,
then please feel free to re-open this bug report. 

Regards,
Clifford