Bug 740587 - rhncfg-client get fails for configuration files that exist on target system as directories
Summary: rhncfg-client get fails for configuration files that exist on target system a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Configuration Management
Version: 540
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714
TreeView+ depends on / blocked
 
Reported: 2011-09-22 15:07 UTC by Stephen Benjamin
Modified: 2013-01-30 17:09 UTC (History)
2 users (show)

Fixed In Version: 5.9.27-6-el5sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-30 17:09:24 UTC


Attachments (Terms of Use)

Description Stephen Benjamin 2011-09-22 15:07:43 UTC
Description of problem:
A user accidentally created a "configuration file" named /usr/local/sbin.  As this matches a standard directory name, Satellite should prohibit this, or at least rhncfg-client should fail gracefully.

Version-Release number of selected component (if applicable):
rhncfg-client-5.9.27-1.el5sat

How reproducible:
Always

Steps to Reproduce:
1. Create a configuration file that matches a directory already on the system (e.g., /usr/local/sbin)
2. Attempt to deploy the configuration file
  
Actual results:
[root@XXXX log]# rhncfg-client get
Deploying /var/spool/rsyslog
Traceback (most recent call last):
  File "/usr/bin/rhncfg-client", line 34, in ?
    sys.exit(Main().main() or 0)
  File "/usr/share/rhn/config_common/rhn_main.py", line 187, in main
    handler.run()
  File "/usr/share/rhn/config_client/rhncfgcli_get.py", line 101, in run
    dep_trans.rollback()
  File "/usr/share/rhn/config_common/transactions.py", line 241, in rollback
    self._chown_chmod_chcon(d, d, val)
  File "/usr/share/rhn/config_common/transactions.py", line 107, in _chown_chmod_chcon
    if file_info['filetype'] != 'symlink':
KeyError: 'filetype'

Expected results:
- Deployment of all configuration files shouldn't fail because 1 file is invalid.
- It should be clear which configuration file failed.  In the example above, the relevant file was /usr/local/bin, but that is not obvious from the output.  Only determined the failed file by editing transactions.py to tell me.

Additional info:

Comment 2 Stephen Herr 2013-01-30 17:09:24 UTC
This was fixed a while ago as a side-effect of bug 637833


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