Bug 215108 - Config Client diffs on directories get reported as missing
Config Client diffs on directories get reported as missing
Status: CLOSED WONTFIX
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Configuration Management (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Todd Sanders
Red Hat Satellite QA List
:
Depends On: 215106
Blocks: 462714
  Show dependency treegraph
 
Reported: 2006-11-10 18:31 EST by Partha Aji
Modified: 2011-01-05 17:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-05 17:51:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Partha Aji 2006-11-10 18:31:31 EST
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 18:35:16 EST
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-11 21:42:16 EDT
User bnackash@redhat.com's account has been closed
Comment 3 Red Hat Bugzilla 2007-05-03 01:43:09 EDT
User wregglej@redhat.com's account has been closed
Comment 5 Clifford Perry 2011-01-05 17:51:11 EST
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.