| Summary: | 500 Internal Server Error on snapshot rollback | ||
|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Shannon Hughes <shughes> |
| Component: | WebUI | Assignee: | Grant Gainey <ggainey> |
| Status: | CLOSED ERRATA | QA Contact: | Pavel StudenÃk <pstudeni> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 570 | CC: | avi.miller, bas, ggainey, pstudeni, satqe-list, tkasparek, tlestach, xdmoon |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1221059 | Environment: | |
| Last Closed: | 2016-06-02 12:33:45 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: | |
| Bug Depends On: | 1221059 | ||
| Bug Blocks: | |||
|
Description
Shannon Hughes
2016-03-31 19:01:34 UTC
looks like we need to pull in this commit:
[shughes@dhcp145-192 spacewalk{master}]$ git show a729b9f4b32c0238b210924cadb70739576eed55
commit a729b9f4b32c0238b210924cadb70739576eed55
Author: Tomas Lestach <tlestach>
Date: Wed May 20 16:17:59 2015 +0200
expect a Number instead of an Integer
addressing issue when Spacewalk with ORA backend fails with:
Caused by: 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)
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerSnapshot.java b/java/code/src/com/redhat/rhn/domain/server/ServerSnapshot.java
index d4f8a6b..ac0cad7 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerSnapshot.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerSnapshot.java
@@ -459,7 +459,7 @@ public class ServerSnapshot extends BaseDomainHelper {
PackageMetadata pm = new PackageMetadata(systemPkg, snapshotPkg);
int comparison;
- switch ((Integer) pkgDiff.get("comparison")) {
+ switch (((Number) pkgDiff.get("comparison")).intValue()) {
case -2: comparison = PackageMetadata.KEY_OTHER_ONLY;
break;
case -1: comparison = PackageMetadata.KEY_OTHER_NEWER;
Shannon, thanks for the great investigation! Moving to MODIFIED, since according to Comment 1 the fix is available in upstream ... spacewalk.git: a729b9f4b32c0238b210924cadb70739576eed55 I assume the BZ was switched over to NEW by accident, so switching back to MODIFIED. Reproducer is only with Oracle db. Verified with spacewalk-java-2.3.8-142.el6sat.noarch.rpm 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-2016:1200 |