Bug 1524211 - Internal Server Error When Setting Kickstart Package List via Spacewalk API
Summary: Internal Server Error When Setting Kickstart Package List via Spacewalk API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jiří Dostál
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space28
TreeView+ depends on / blocked
 
Reported: 2017-12-10 20:05 UTC by jsanders
Modified: 2018-04-20 12:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-20 12:32:16 UTC
Embargoed:


Attachments (Terms of Use)
Tomcat Log (12.61 KB, text/plain)
2017-12-10 20:05 UTC, jsanders
no flags Details

Description jsanders 2017-12-10 20:05:03 UTC
Created attachment 1365706 [details]
Tomcat Log

Description of problem:
Calling the kickstart.profile.software.setSoftwareList method of the Spacewalk API via XMLRPC returns an internal server error to the client.  On the server side, the catalina.out logs show a org.hibernate.NonUniqueObjectException.  Full exception log is attached.

Version-Release number of selected component (if applicable):
2.7

How reproducible:
Every time

Steps to Reproduce:
1. Have a preexisting kickstart profile on Spacewalk server
2. Using Python 2.7 and xmlrpclib v1.0.1, create instance of xmlrpclib.Server with Spacewalk API URL
3. Authenticate Server instance using auth.login method to get sessionKey
4. Call kickstart.profile.software.setSoftwareList() API method with sessionKey from step 3, ksLabel from step 1, and any list of packages

Actual results:
Spacewalk server returns Internal Server Error message to client.
Spacewalk server throws org.hibernate.NonUniqueObjectException

Expected results:
Spacewalk server updates kickstart profile package list with packages listed in packageList parameter of setSoftwareList() function.

Additional info:
This issue seems closely related to this other bug: https://bugzilla.redhat.com/show_bug.cgi?id=1520664

Comment 1 Jiří Dostál 2017-12-12 07:33:00 UTC
I confirm that this is related to bz1520664

Comment 2 Jiří Dostál 2018-01-03 09:31:39 UTC
spacewalk 8f3473214cbe73997aa23e69663aff732f2a4940

Comment 3 jsanders 2018-01-03 23:56:29 UTC
Thank you!  I was able to apply the patch to 2.7 with slight modification.  I am now able to update a profile software list via XMLRPC.

Comment 4 Jiří Dostál 2018-03-26 12:17:01 UTC
Moving ON_QA

Comment 5 Jiří Dostál 2018-04-20 12:32:16 UTC
Spacewalk 2.8 has been released.
https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes28


Note You need to log in before you can comment on or make changes to this bug.