Bug 769598 - Removing a Custom channel via API with spacewalk-repo-sync running cause Traceback.
Summary: Removing a Custom channel via API with spacewalk-repo-sync running cause Trac...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 541
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714
TreeView+ depends on / blocked
 
Reported: 2011-12-21 12:41 UTC by Dimitar Yordanov
Modified: 2015-05-29 20:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-29 20:12:06 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dimitar Yordanov 2011-12-21 12:41:18 UTC
Description of problem:

In case spacewalk-repo-sync is running any attempt to remove the Custom Channel via API  generates Traceback.

It is interesting that there is not problem to remove a package from the channel when spacewalk-repo-sync is running which can be considered as a problem as well.

Similar problem is described and solved in:
 Bug 663326 - Channel deletion doesn't check for spacewalk-repo-sync process running in background leading to tracebacks 


Version-Release number of selected component (if applicable):
spacewalk-backend-1.2.13-61.el6sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create an external repository (Channels -> Manage Repositories)
2. Create a custom channel (Channels -> Manage Software Channels)
3. Associate repository to channel (Channels -> Manage Software Channels -> (Select Channel) -> Repositories tab)
4. Sync the repository  to the Custom Channel(Channels -> Manage Software Channels ->
(Select Channel) -> Repositories tab -> Sync subtab -> Sync Now)
5. Check spacewalk-repo-sync is runnnig
  ps -ef | grep spacewalk-repo-sync
  
6. Try to delete the channel via API

export SAT_SERVER=$( hostname )
export CUSTOM_CHANNEL='test_channel_remove_at_sync_time'
python -c "import xmlrpclib,os; \
        SERVER  = os.environ['SAT_SERVER']; \
        CHANNEL = os.environ['CUSTOM_CHANNEL']; \
        client = xmlrpclib.Server('http://%s/rpc/api' % SERVER, verbose=0); \
        key = client.auth.login('admin','nimda'); \
        client.channel.software.delete(key, CHANNEL); \
        print client.api.systemVersion()"


 

  
Actual results:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: ORA-00060: deadlock detected while waiting for resource\nORA-06512: at "RHNSAT.DELETE_CHANNEL", line 15\nORA-06512: at line 1\n'>


Expected results:
Message that the channel can not be removed due to spacewalk-repo-sync process.


Additional info:


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