Bug 1309003 - rhncfg-manager raises an exception while handling an exception during a file deployment
Summary: rhncfg-manager raises an exception while handling an exception during a file ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.4
Hardware: All
OS: All
medium
medium
Target Milestone: ---
Assignee: Gennadii Altukhov
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 1215658
Blocks: sat570-triage space27
TreeView+ depends on / blocked
 
Reported: 2016-02-16 17:10 UTC by Gennadii Altukhov
Modified: 2017-09-28 18:11 UTC (History)
5 users (show)

Fixed In Version:
Clone Of: 1215658
Environment:
Last Closed: 2016-06-16 08:09:57 UTC
Embargoed:


Attachments (Terms of Use)

Description Gennadii Altukhov 2016-02-16 17:10:56 UTC
Description of problem:
rhncfg-manager raises an exceptions while handling an exception during a file deployment

Version-Release number of selected component (if applicable):
Spacewalk server 2.4
rhncfg-management-5.10.85-1.el6.noarch


Steps to Reproduce:
1. create a configuration channel
2. add a file owned by a user that would not be present on the system by default
   add a directory owned by a user that would not be present on the system by default and contains a common directory with created file in its path
   for example:
   file /usr/share/cfg/file
   dir  /usr/share/cfg/dir

3. on a system that does not have that user, use rhncfg-manager download-channel -t /tmp my_test_config_channel

Actual results:
the following trace : 
Traceback (most recent call last):
  File "/usr/bin/rhncfg-manager", line 46, in ?
    sys.exit(Main().main() or 0)
  File "/usr/share/rhn/config_common/rhn_main.py", line 207, in main
    handler.run()
  File "/usr/share/rhn/config_management/rhncfg_download_channel.py", line 52, in run
    config_channel=ns)
  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[0])
  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 266, in rollback
    os.rmdir(remove_dir)
OSError: [Errno 39] Directory not empty: '/usr2/tools'

Expected results:
rollback transaction w/o any errors

Additional info:
if we have only a file in our configuration channel and we download it by rhncfg-manager, and something wrong happened, rhncfg do not try to rollback transaction. You can find the file on filesystem, but actually with "generated name". There is actually another problem which makes impossible to remove directory complitely.

Comment 1 Gennadii Altukhov 2016-02-16 17:11:49 UTC
Taking...

Comment 2 Gennadii Altukhov 2016-02-29 15:52:59 UTC
spacewalk.git:
20fc36c3ec3e4d09bd032d2183253db945945f66

Comment 3 Eric Herget 2017-09-28 18:11:49 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


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