Bug 477228

Summary: Unable to cancel actions using schedule.cancelActions
Product: [Community] Spacewalk Reporter: Brad Buckingham <bbuckingham>
Component: APIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 0.4CC: jason.dobies, mmccune
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: 2009-01-22 16:31: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: 456552    
Attachments:
Description Flags
Exception details from catalina.out none

Description Brad Buckingham 2008-12-19 18:44:27 UTC
Created attachment 327482 [details]
Exception details from catalina.out

Description of problem:

Attempting to cancel an action using the schedule.cancelActions() api generates an exception that is thrown back to the user as well as logged in catalina.out.  The exception generated is new since the integration with cobbler and is related to a kickstart query.

See attachment for the detailed error from catalina.out.



Version-Release number of selected component (if applicable):
Testing w/ latest git master as of Dec 19.

How reproducible:
always

Steps to Reproduce:
1. schedule an action to 
(e.g. client.system.scheduleHardwareRefresh(key,1000020124, <earliest>))
2. attempt to schedule the action using the api:
client.schedule.cancelActions(key, [<actionId>])

  
Actual results:
Exception generated (however, action is canceled)

Expected results:
Action cancelled without exception

Additional info:
See attachment

Comment 1 Brad Buckingham 2009-01-09 23:40:46 UTC
git commit: 5273454049014a5be9ed73b689c4d53115295bec


The ActionManager.cancelAction was deleting the ServerAction before it was finished using it.  Basically, it would delete the ServerActions then perform action.getServerActions resulting in an empty list.  When this empty list was passed to KickstartFactory.failKickstartSessions, the hibernate query could generate an exception because it expected the servers collection (i.e. list passed) to have contents.