Description of problem: If you deploy a symlink to a directory with the configuration management, that works just fine. If you try to redeploy that symlink again (without deleting the old one), it fails because rhncfg-client thinks that a directory of the same name exists already. Version-Release number of selected component (if applicable): rhncfg-client-5.9.19-1.fc12.noarch How reproducible: Always Steps to Reproduce: 1. create a symlink /test that points to /tmp 2. deploy the symlink 3. deploy it again Actual results: # ls -ahl /test lrwxrwxrwx. 1 root root 5 Aug 25 18:44 /test -> /tmp # rhncfg-client-get /test Error: unable to deploy file /test, as it is already a directory on disk Expected results: # rhncfg-client-get /test Deploying /test Additional info: A single symlink that points to a directory completely breaks functionality of 'rhncfg-client get' (i.e. without file-parameter) and 'deploy all config files' in the WebUI because it will then not deploy all other files (rollback).
Mass-moving to space13.
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.
Aligning under space16.
Problem has been fixed in spacewalk.git master with commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f
Created attachment 533600 [details] patch proposed Hello team, Here follow an complementary patch for commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f when handling directory symlinks. After applying the patch: #rhncfg-client elist Mode Owner Group Size Rev Config Channel File lrwxrwxrwx root root 14 1 teste /boot/cross-dir -> /usr/local/bin lrwxrwxrwx root root 11 2 teste /boot/cross-link -> /etc/passwd -rw-r--r-- root root 15 1 teste /etc/test-file-regular lrwxrwxrwx root root 10 2 teste /root/sym-link-same-part -> /etc/hosts lrwxrwxrwx root root 4 1 teste /teste -> /tmp #rhncfg-client verify missing /boot/cross-dir missing /boot/cross-link missing /etc/test-file-regular missing /root/sym-link-same-part missing /teste #rhncfg-client get Deploying /etc/test-file-regular Deploying /boot/cross-link Deploying /root/sym-link-same-part Deploying /teste Deploying /boot/cross-dir #rhncfg-client verify /boot/cross-dir /boot/cross-link /etc/test-file-regular /root/sym-link-same-part /teste #ls -lad /teste /boot/cross-dir lrwxrwxrwx 1 root root 14 Nov 14 16:40 /boot/cross-dir -> /usr/local/bin lrwxrwxrwx 1 root root 4 Nov 14 16:40 /teste -> /tmp #rhncfg-client get Deploying /etc/test-file-regular Deploying /boot/cross-link Deploying /root/sym-link-same-part Deploying /teste Deploying /boot/cross-dir #ls -lad /teste /boot/cross-dir lrwxrwxrwx 1 root root 14 Nov 14 16:41 /boot/cross-dir -> /usr/local/bin lrwxrwxrwx 1 root root 4 Nov 14 16:41 /teste -> /tmp #tree /var/lib/rhncfg/backups/ /var/lib/rhncfg/backups/ |-- boot | |-- cross-dir.rhn-cfg-backup -> /usr/local/bin | `-- cross-link.rhn-cfg-backup -> /etc/passwd |-- etc | `-- test-file-regular.rhn-cfg-backup |-- root | `-- sym-link-same-part.rhn-cfg-backup -> /etc/hosts `-- teste.rhn-cfg-backup -> /tmp 5 directories, 3 files Patch already submitted to approval at spacewalk-devel maillist. Mail Thread: https://www.redhat.com/archives/spacewalk-devel/2011-November/msg00027.html Thank you. Best Regards, mmello
Based on new information, moving to ASSIGNED and needinfo on devel to review proposed patch to improve fix/solution to this bug.
Well, comment #7 is missing an important piece of information - this happens when deployed symlink (e.g. /boot/cross-dir) and rhncfg backup (/var/lib/rhncfg/backup) are on different devices.
Patch applied to spacewalk master as commit e55bf36731263ba0324fc47578ab4b5ed3537b4c 627490 - fixed cross device symlink backup Complementary patch for commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f Fixing the issue when config file and backup (/var/lib/rhncfg/backup) are on a different devices.
Spacewalk 1.6 has been released.