Description of problem: Removing a repository that has filters assigned causes ISE. Version-Release number of selected component (if applicable): spacewalk-java-2.0.2-62 How reproducible: Always. Steps to Reproduce: 1. Create repository test_repo_f on WebUI. 2. Set filters for this repository via API: >>> import sys, xmlrpclib >>> RHN_SERVER='https://test.redhat.com/rpc/api' >>> RHN_USER='xxxxx' >>> RHN_PASS='xxxxxx' >>> client = xmlrpclib.Server(RHN_SERVER, verbose=0) >>> key = client.auth.login(RHN_USER, RHN_PASS) >>> client.channel.software.setRepoFilters(key,"test_repo_f",[{"filter":"test_f","flag":"-"}]) 3. List the filters for the repository via API. >>> client.channel.software.listRepoFilters(key,"test_repo_f") [{'filter': 'test_f', 'flag': '-', 'sortOrder': 1}] 4. Try to remove the repository via API. >>> client.channel.software.removeRepo(key,"test_repo_f") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.7/xmlrpclib.py", line 1578, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/xmlrpclib.py", line 1312, in single_request response.msg, xmlrpclib.ProtocolError: <ProtocolError for test.redhat.com/rpc/api: 500 Internal Server Error> 5. Try to remove the repository from WebUI ISE: ### /var/lib/pgsql/data/pg_log/postgresql-Fri.log 2014-04-04 08:48:09.242 EDT ERROR: update or delete on table "rhncontentsource" violates foreign key constraint "rhn_csf_source_fk" on table "rhncontentsourcefilter" 2014-04-04 08:48:09.242 EDT DETAIL: Key (id)=(505) is still referenced from table "rhncontentsourcefilter". 2014-04-04 08:48:09.242 EDT STATEMENT: delete from rhnContentSource where id=$1 2014-04-04 08:48:09.242 EDT ERROR: current transaction is aborted, commands ignored until end of transaction block 2014-04-04 08:48:09.242 EDT STATEMENT: select 'c3p0 ping' from dual Additional info: Clearing the filters beforehand using API call channel.software.clearRepoFilters can be used as workaround.
spacewalk.git master: c0e39816a727b7a734ab5cf68a14bcf7c76fc9b4
Verified. spacewalk-java-2.3.8-57.el6sat.noarch In step 4. repository is sucessfuly removed via API. In step 5. repository is sucessfuly removed via WebUI. Reproduced on spacewalk-java-2.0.2-90.el6sat.noarch In step 4. appeard exception: xmlrpclib.ProtocolError: <ProtocolError for hp-ml370g4-01.rhts.eng.bos.redhat.com/rpc/api: 500 Internal Server Error> In step 5. appeard same output in log file as bugzilla said. #!/usr/bin/python import xmlrpclib RHN_SERVER='http://XXX.redhat.com/rpc/api' RHN_USER='XXX' RHN_PASS='XXX' try: client = xmlrpclib.Server(RHN_SERVER, verbose=0) key = client.auth.login(RHN_USER, RHN_PASS) client.channel.software.setRepoFilters(key,"test_repo_f",[{"filter":"test_f","flag":"-"}]) client.channel.software.listRepoFilters(key,"test_repo_f") client.channel.software.removeRepo(key,"test_repo_f") except Exception: print('error appears') raise
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is being moved to a Closed Current Release state. The Satellite 5.7 GA Errata: - https://rhn.redhat.com/errata/RHSA-2015-0033.html Satellite 5.7 Release Notes: - https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html Satellite Customer Portal Blog announcement for release: - https://access.redhat.com/blogs/1169563/posts/1315743 Cliff