Bug 215108 - Config Client diffs on directories get reported as missing
Summary: Config Client diffs on directories get reported as missing
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Configuration Management
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Todd Sanders
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Keywords:
Depends On: 215106
Blocks: 462714
TreeView+ depends on / blocked
 
Reported: 2006-11-10 23:31 UTC by Partha Aji
Modified: 2011-01-05 22:51 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-01-05 22:51:11 UTC


Attachments (Terms of Use)

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


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