Bug 654594

Summary: ISE: channel.software.removePackages
Product: [Community] Spacewalk Reporter: Šimon Lukašík <slukasik>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 1.2Keywords: Regression
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-1.3.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-08 08:41:26 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: 653453    
Attachments:
Description Flags
/var/log/tomcat5/catalina.out
none
/var/log/rhn/rhn_web_api.log none

Description Šimon Lukašík 2010-11-18 10:58:58 UTC
Version-Release number of selected component (if applicable):
Spacewalk 12
spacewalk-java-1.2.112-1.el5

How reproducible:
deterministic 

Steps to Reproduce:
1. I have channel with about 700 dummy packages nothing really special.
2. call channel.software.removePackages for all packages in channel
3.
  
Actual results:
 <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: Could not set null value for parameter: reason'> is thrown
and packages are not removed from channel

Expected results:
Remove packages from channel. 

Additional info:

Comment 1 Šimon Lukašík 2010-11-18 10:59:37 UTC
I use reproducer similar to this:

packageids = []
packages = client.channel.software.listAllPackages(key, CHANNEL)
for package in packages:
   packageids.append(package_get_id(package))
for erratum in client.channel.software.listErrata(key, CHANNEL):
   client.errata.delete(key, erratum['advisory_name'])
if len(packageids) > 0:
    client.channel.software.removePackages(key, CHANNEL, packageids)

Comment 2 Šimon Lukašík 2010-11-18 11:00:23 UTC
Created attachment 461268 [details]
/var/log/tomcat5/catalina.out

Comment 3 Šimon Lukašík 2010-11-18 11:01:26 UTC
Created attachment 461269 [details]
/var/log/rhn/rhn_web_api.log

Comment 4 Šimon Lukašík 2010-11-18 11:05:15 UTC
Forgot to add I use spacewalk 12 with oracle backend
spacewalk-oracle-1.2.3-1.el5
spacewalk-backend-1.2.72-1.el5

Comment 6 Šimon Lukašík 2010-11-18 11:10:56 UTC
Also note that right after the reproducer, when You are unable to 
delete this particular channel on webui and big red banner is shown:
"""
There are currently kickstart distributions associated to this channel. Please disassociate or delete the kickstart distributions before proceeding to delete the channel.
"""

Comment 7 Tomas Lestach 2010-11-18 13:22:41 UTC
I'd say, this was fixed by recent commits:

spacewalk.git:
 2513f6a393fff87c35d711fb294a4fc4b52ee36a
 418912b07571555cb44329f84660607d6e8887bf

Comment 8 Tomas Lestach 2011-02-03 12:21:30 UTC
Moving ON_QA ...

Comment 9 Tomas Lestach 2011-02-08 08:41:26 UTC
This bug has been fixed in Spacewalk 1.3.