Bug 523146

Summary: can't delete uploaded package via xmlrpc
Product: Red Hat Satellite 5 Reporter: Daniel Mach <dmach>
Component: APIAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: cperry, jmatthew, msuchy, psklenar, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-03 14:18:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 518263    

Description Daniel Mach 2009-09-14 09:00:30 UTC
Description of problem:
packages.removePackage throws redstone.xmlrpc.XmlRpcFault


Steps to Reproduce:
1. place a package signed with different keys to dir1 and dir2
2. rhnpush -v --server=S --username=U --password=P --orgid=-1 -d dir1 -d dir2 --channel=CH --force
3. use packages.findByNvrea([n, v, r, e, a]) to get pkg_info hash
4. call packages.removePackage(pkg_info["id"])
5. repeat steps 3, 4


Actual results:
after step 4:
Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: null'>

after step 5:
Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: ORA-00001: unique constraint (RHNSAT.RHN_PFDQUEUE_PATH_UQ) violated\n'>


Expected results:
no exception is thrown, package is deleted

Comment 1 Miroslav Suchý 2009-09-14 09:13:48 UTC
In catalina.out was:
2009-09-14 10:00:52,897 [TP-Processor3] ERROR com.redhat.rhn.frontend.xmlrpc.BaseHandler - Caused by:
java.lang.NullPointerException
        at com.redhat.rhn.manager.rhnpackage.PackageManager.schedulePackageRemoval(PackageManager.java:749)
        at com.redhat.rhn.frontend.xmlrpc.packages.PackagesHandler.removePackage(PackagesHandler.java:382)

Comment 2 Miroslav Suchý 2009-09-14 09:20:45 UTC
It has been due typo in column name.
Fixed in spacewalk repo in commit 7829eae7e4edd6a145ad962f7fa038bf9a8c67ca

Comment 3 Tomas Lestach 2010-02-17 13:51:35 UTC
satellite.git: 585a52bb88b4a32913bd5d5ba76bb630743bfd85

changing status to ON_QA

Comment 8 errata-xmlrpc 2010-03-03 14:18:10 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0128.html

Comment 9 Jan Pazdziora (Red Hat) 2012-03-15 12:36:21 UTC
*** Bug 515596 has been marked as a duplicate of this bug. ***