Red Hat Bugzilla – Bug 1309006
rhncfg-manager removes all directories in a path during rollback transaction
Last modified: 2017-09-28 14:07:37 EDT
Description of problem:
rhncfg-manager raises an exceptions while handling an exception during a configuration directory deployment.
Version-Release number of selected component:
Spacewalk server 2.4
0) Have an installed Spacewalk 2.4
1) Create a configuration channel
2) In configuration channel chose 'Add Files' -> 'Create File', add a directory, owned by a user that would not be present on the system by default
3) Register a client system in the Spacewalk Server with 'Provisioning' Entitlement
4) On the client system install packages rhncfg*
5) and run:
rhncfg-manager download-channel --topdir=/tmp rmdir_test_channel
[root@test04-64 ~]# rhncfg-manager download-channel --topdir=/tmp rmdir_test_channel
Using server name test01-64.sysmgmt.lab.eng.rdu2.redhat.com
Traceback (most recent call last):
File "/usr/bin/rhncfg-manager", line 46, in <module>
sys.exit(Main().main() or 0)
File "/usr/share/rhn/config_common/rhn_main.py", line 207, in main
File "/usr/share/rhn/config_management/rhncfg_download_channel.py", line 52, in run
File "/usr/share/rhn/config_common/deploy.py", line 65, in deploy_files
try_rollback(dep_trans, "Error unable to deploy file, information on user '%s' could not be found" % e)
File "/usr/share/rhn/config_common/deploy.py", line 81, in try_rollback
File "/usr/share/rhn/config_common/transactions.py", line 272, in rollback
OSError: [Errno 39] Directory not empty: '/tmp'
do no try to remove directories which were not created by current transaction
There is another bug 1309003, which is similar to this one, but actually
there is a reason to do it separately.
Spacewalk 2.5 was released.
This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug.