Bug 1514020

Summary: Unhandled internal exception when trying to cancel child scheduled event
Product: Red Hat Satellite 5 Reporter: Radovan Drazny <rdrazny>
Component: TaskomaticAssignee: Jiří Dostál <jdostal>
Status: CLOSED ERRATA QA Contact: Martin Korbel <mkorbel>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: bishop, jdostal, mkorbel, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.5.14-108-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-05 13:56:41 UTC Type: Bug
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: 1450111    

Description Radovan Drazny 2017-11-16 13:51:46 UTC
Description of problem:
Since the spacewalk-java-2.5.14-103, after scheduling an event with child events (e.g. provisioning a system) it is not possible to cancel a child event using the WebUI. It is still possible to try cancelling it using the API, leading to "redstone.xmlrpc.XmlRpcFault: unhandled internal exception: null". As it is not possible to restrict types of events API can try to cancel, it would be useful to return a more useful error message instead. 

Version-Release number of selected component (if applicable):
spacewalk-java-2.5.14-105

How reproducible:
always

Steps to Reproduce:
1. Schedule provisioning for a system
2. Get the event id for the child event (System reboot for example)
3. Try running client.schedule.cancelActions(key, <child_event_id>)

Actual results:
client.schedule.cancelActions(key, [31])
Traceback (most recent call last):
  File "<stdin>", 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: null'>

Expected results:
A more descriptive error message.

Additional info:
For more info regarding the WebUI version of this bug, see BZ1492572.

Comment 3 Jiří Dostál 2017-11-29 13:28:18 UTC
spacewalk.git b71940b78b8848af892ea1d476ed1a57495b78f8

Comment 6 Martin Korbel 2018-01-11 08:38:03 UTC
VERIFIED on spacewalk-java-2.5.14-108.el6sat

> spacewalk-api --server=localhost --user=admin schedule.cancelActions "%session%" 8
Enter your password: 
Fault returned from XML RPC Server, fault code -1: redstone.xmlrpc.XmlRpcFault: unhandled internal exception: It's allowed to cancel only top level actions.

Comment 9 errata-xmlrpc 2018-02-05 13:56:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0274

Comment 10 Jiří Dostál 2018-02-20 10:09:26 UTC
*** Bug 1546240 has been marked as a duplicate of this bug. ***