Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1221059

Summary: 500 Internal Server Error on snapshot rollback
Product: [Community] Spacewalk Reporter: bas
Component: WebUIAssignee: Grant Gainey <ggainey>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.3CC: avi.miller
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.4.20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1322962 (view as bug list) Environment:
Last Closed: 2016-03-31 19:20:36 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: 1322962, 1484117    

Description bas 2015-05-13 09:03:38 UTC
Description of problem:
When trying to rollback a package profile on the "Systems => Provisioning => Snapshots" page, I get a 500 internal server error. This only occurs when there are packages to rollback. A rollback of a group or channel change works.

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

How reproducible:
Always

Steps to Reproduce:
1. Update package on client registered with Spacewalk 2.3.
2. Try to rollback to an earlier snapshot with an older version of the installed package.
3. After clicking "Rollback to Snapshot" an internal server error is generated 

Actual results:
Return internal server error

Expected results:
Schedule package rollback

Additional info:
Using Spacewalk 2.3 on CentOS 7 with Oracle DB

Tomcat log shows:
May 13, 2015 10:24:51 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [action] in context with path [/rhn] threw exception [java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer] with root cause
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
        at com.redhat.rhn.domain.server.ServerSnapshot.preparePackagesForSync(ServerSnapshot.java:462)
        at com.redhat.rhn.domain.server.ServerSnapshot.rollbackPackages(ServerSnapshot.java:369)
        at com.redhat.rhn.frontend.action.systems.sdc.SnapshotRollbackAction.rollback(SnapshotRollbackAction.java:108)
        at com.redhat.rhn.frontend.action.systems.sdc.SnapshotRollbackAction.execute(SnapshotRollbackAction.java:79)

Comment 1 Grant Gainey 2016-03-31 19:20:36 UTC
spacewalk.github:
a729b9f4b32c0238b210924cadb70739576eed55

fixed 2015-05-20, was released in SW-2.4

Comment 2 Eric Herget 2017-09-28 18:11:06 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.