Bug 683264
| Summary: | Configuration file deployment creates extraneous directories | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Aron Parsons <aparsons> | ||||
| Component: | Client | Assignee: | Michael Mráka <mmraka> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Dimitar Yordanov <dyordano> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 540 | CC: | clasohm, cperry, dyordano, greg.cornell, jblazek, jhutar, martin.philippi, mmello, mosvald, mzazrivec, nobody, rmahique, tlestach, xdmoon | ||||
| Target Milestone: | --- | Keywords: | Regression | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | rhncfg-5.9.27-16 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 703376 (view as bug list) | Environment: | |||||
| Last Closed: | 2011-06-16 16:53:54 UTC | Type: | --- | ||||
| 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: | 677501, 703376, 704496 | ||||||
| Attachments: | 
 | ||||||
| 
        
          Description
        
        
          Aron Parsons
        
        
        
        
        
          2011-03-08 23:00:41 UTC
        
       Fixed in spacewalk master by
commit f12d4bcd1ee2e04740f30fb5225ce1d688142114
    don't make link target absolute
    fixing
     # pwd
     /root
     # ll /etc/openldap/cacerts/link
     lrwxrwxrwx 1 root root 10 Apr 11 10:09 /etc/openldap/cacerts/link -> server.crt
     # rhncfg-client diff /etc/openldap/cacerts/link
     Symbolic links differ.
     Channel: '/etc/openldap/cacerts/link' -> '/etc/openldap/cacerts/dir'
     System: '/etc/openldap/cacerts/link' -> '/root/server.crt'
commit 306e20b99fbe41693f83a2d9481612f2f642cbba
    683264 - fixed extraneous directory creation via rhncfg-manager
commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f
    fixed symlink deployment via rhn_check
    fixing
    Client execution returned "Failed deployment, /symlink already exists as a directory
commit f3ec0e4a87d21c72c2e8945f8c4fa272b4088da3
    683264 - rootdir is / when called from rhn_check
commit c10aec147ed9773fc48f140cf8526cd41d47faa0
    don't rollback transaction if symlink already exists
commit 455fecf78853740842ed3ebe5addcbc3779c9c2a
    made entry look nicer
commit 7627e804ad29d524f9cb50d2470a24daa15dc625
    fixed traceback during rollback
    fixing
    Failed rollback
    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 25, in run
        self.options.exclude)
      File "/usr/share/rhn/config_common/deploy.py", line 75, in deploy_files
        try_rollback(dep_trans, "Deploy failed, rollback successful")
      File "/usr/share/rhn/config_common/deploy.py", line 82, in try_rollback
        dep_trans.rollback()
      File "/usr/share/rhn/config_common/transactions.py", line 243, in rollback
        self._chown_chmod_chcon(d, d, val)
      File "/usr/share/rhn/config_common/transactions.py", line 111, in _chown_chmod_chc
        if file_info['filetype'] != 'symlink':
    KeyError: 'filetype'
commit 4b7aef0645d1535dc82eb0e018766fdafcfe62cb
    don't fail if link points to directory
    fixed
    Deploying //etc/openldap/cacerts/dir
    Failed rollback
    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 25, in run
        self.options.exclude)
      File "/usr/share/rhn/config_common/deploy.py", line 74, in deploy_files
        try_rollback(dep_trans, "Deploy failed, rollback successful")
      File "/usr/share/rhn/config_common/deploy.py", line 81, in try_rollback
        dep_trans.rollback()
      File "/usr/share/rhn/config_common/transactions.py", line 243, in rollback
        self._chown_chmod_chcon(d, d, val)
      File "/usr/share/rhn/config_common/transactions.py", line 111, in _chown_chmod_chc
        if file_info['filetype'] != 'symlink':
    KeyError: 'filetype'
Fixed spacewalk package rhncfg-5.9.53-1.
Backported to SATELLITE-5.4 as
commit dc9f999befc0d2dee3d02180bf4196559211253a
    don't make link target absolute
    fixing
     # pwd
     /root
     # ll /etc/openldap/cacerts/link
     lrwxrwxrwx 1 root root 10 Apr 11 10:09 /etc/openldap/cacerts/link -> server.crt
     # rhncfg-client diff /etc/openldap/cacerts/link
     Symbolic links differ.
     Channel: '/etc/openldap/cacerts/link' -> '/etc/openldap/cacerts/dir'
     System: '/etc/openldap/cacerts/link' -> '/root/server.crt'
    (cherry picked from commit f12d4bcd1ee2e04740f30fb5225ce1d688142114)
commit 64aac311b88e4ac28f414769afb26e7ab092b967
    683264 - fixed extraneous directory creation via rhncfg-manager (cherry picked from commit 306e20b99fbe41693f83a2d9481612f2f642cbba)
commit f2baef79f945aa20d12c2412b07bd93e3e909d91
    fixed symlink deployment via rhn_check
    fixing
    Client execution returned "Failed deployment, /symlink already exists as a directory" (code 45)
    (cherry picked from commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f)
commit fe885556e014cc5419ce59c2b331671683733cd0
    683264 - rootdir is / when called from rhn_check (cherry picked from commit f3ec0e4a87d21c72c2e8945f8c4fa272b4088da3)
commit b3a1b23a889164bd9e3f4958853d0cb753599b9e
    don't rollback transaction if symlink already exists (cherry picked from commit c10aec147ed9773fc48f140cf8526cd41d47faa0)
commit 47763edb963be88567e60432db197411ea1e910b
    made entry look nicer (cherry picked from commit 455fecf78853740842ed3ebe5addcbc3779c9c2a)
commit 1f378c6f310fbfcc4baf89ba777b521d335a2739
    fixed traceback during rollback
    fixing
    Failed rollback
    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 25, in run
        self.options.exclude)
      File "/usr/share/rhn/config_common/deploy.py", line 75, in deploy_files
        try_rollback(dep_trans, "Deploy failed, rollback successful")
      File "/usr/share/rhn/config_common/deploy.py", line 82, in try_rollback
        dep_trans.rollback()
      File "/usr/share/rhn/config_common/transactions.py", line 243, in rollback
        self._chown_chmod_chcon(d, d, val)
      File "/usr/share/rhn/config_common/transactions.py", line 111, in _chown_chmod_chcon
        if file_info['filetype'] != 'symlink':
    KeyError: 'filetype'
    (cherry picked from commit 7627e804ad29d524f9cb50d2470a24daa15dc625)
commit f85f05b3821a822d54233f8f831d7916300dbc18
    don't fail if link points to directory
    fixed
    Deploying //etc/openldap/cacerts/dir
    Failed rollback
    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 25, in run
        self.options.exclude)
      File "/usr/share/rhn/config_common/deploy.py", line 74, in deploy_files
        try_rollback(dep_trans, "Deploy failed, rollback successful")
      File "/usr/share/rhn/config_common/deploy.py", line 81, in try_rollback
        dep_trans.rollback()
      File "/usr/share/rhn/config_common/transactions.py", line 243, in rollback
        self._chown_chmod_chcon(d, d, val)
      File "/usr/share/rhn/config_common/transactions.py", line 111, in _chown_chmod_chcon
        if file_info['filetype'] != 'symlink':
    KeyError: 'filetype'
    (cherry picked from commit 4b7aef0645d1535dc82eb0e018766fdafcfe62cb)
*** Bug 696283 has been marked as a duplicate of this bug. *** Created attachment 491996 [details]
temporary patch
temporary patch to fix the problem before engineering release a correct/cleaner fix for it
please, see duplicate BZ #696283 for more details to the patch Verified on RHEL4, RHEL5 and RHEL6. *** Bug 704884 has been marked as a duplicate of this bug. *** Verified in stage w/ rhncfg-5.9.27-17 -> release pending. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0878.html Hi, take a look at RHBA-2011:0878 shows me, that NOT all packages are linked to the RHEL 4 ES channels : 10 RPM's are linked to the AS channels and only 4 are linked to the ES channels : Red Hat Network Tools for RHEL AS (v.4 for AMD64/Intel EM64T) md5:5f8c74cc96a58d48b2ff2563ddf1b719 koan-2.0.7-11.el4sat-noarch md5:81fe97d2153bb9442d045c4f7be4dbed python-urlgrabber-2.9.8-2.el4-noarch md5:dd715f7f01031923d4f08ad68e715084 rhncfg-5.9.27-17.el4-noarch md5:58677f706c6a96d395b0b8c71112ae87 rhncfg-actions-5.9.27-17.el4-noarch md5:cac4513769924a47e8ddbf24a68a8c24 rhncfg-client-5.9.27-17.el4-noarch md5:ebc8b228355d6a3b6219ca96d66d2076 rhncfg-management-5.9.27-17.el4-noarch md5:e75930845daf65855a73eac0b825f037 rhnmd-5.3.7-1.el4sat-noarch md5:b1b6fcdfbeb95a524b6b4a6825fe317a spacewalk-koan-0.2.7-7.el4sat-noarch md5:de72749d9f844ff885acdef9437c7b9f spacewalk-proxy-installer-1.1.2-7.el4sat-noarch md5:8482ab01b42a7a34c2225c9952cb36f1 spacewalk-remote-utils-1.0.2-6.el4sat-noarch Red Hat Network Tools for RHEL AS (v.4 for x86) md5:5f8c74cc96a58d48b2ff2563ddf1b719 koan-2.0.7-11.el4sat-noarch md5:81fe97d2153bb9442d045c4f7be4dbed python-urlgrabber-2.9.8-2.el4-noarch md5:dd715f7f01031923d4f08ad68e715084 rhncfg-5.9.27-17.el4-noarch md5:58677f706c6a96d395b0b8c71112ae87 rhncfg-actions-5.9.27-17.el4-noarch md5:cac4513769924a47e8ddbf24a68a8c24 rhncfg-client-5.9.27-17.el4-noarch md5:ebc8b228355d6a3b6219ca96d66d2076 rhncfg-management-5.9.27-17.el4-noarch md5:e75930845daf65855a73eac0b825f037 rhnmd-5.3.7-1.el4sat-noarch md5:b1b6fcdfbeb95a524b6b4a6825fe317a spacewalk-koan-0.2.7-7.el4sat-noarch md5:de72749d9f844ff885acdef9437c7b9f spacewalk-proxy-installer-1.1.2-7.el4sat-noarch md5:8482ab01b42a7a34c2225c9952cb36f1 spacewalk-remote-utils-1.0.2-6.el4sat-noarch Red Hat Network Tools for RHEL ES (v.4 for AMD64/Intel EM64T) md5:81fe97d2153bb9442d045c4f7be4dbed python-urlgrabber-2.9.8-2.el4-noarch md5:e75930845daf65855a73eac0b825f037 rhnmd-5.3.7-1.el4sat-noarch md5:b1b6fcdfbeb95a524b6b4a6825fe317a spacewalk-koan-0.2.7-7.el4sat-noarch md5:8482ab01b42a7a34c2225c9952cb36f1 spacewalk-remote-utils-1.0.2-6.el4sat-noarch Red Hat Network Tools for RHEL ES (v.4 for x86) md5:81fe97d2153bb9442d045c4f7be4dbed python-urlgrabber-2.9.8-2.el4-noarch md5:e75930845daf65855a73eac0b825f037 rhnmd-5.3.7-1.el4sat-noarch md5:b1b6fcdfbeb95a524b6b4a6825fe317a spacewalk-koan-0.2.7-7.el4sat-noarch md5:8482ab01b42a7a34c2225c9952cb36f1 spacewalk-remote-utils-1.0.2-6.el4sat-noarch I think this needs to be fixed. Our systems RHEL 4 ES don't see the new rhncfg-... packages ! The missing packages were linked to RHEL 4 ES channels. |