Bug 1635229

Summary: [downstream clone - 4.2.7] Entries for snapshot creations in the command_entities table in the database prevented access to the Admin Portal
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: ovirt-engineAssignee: Ravi Nori <rnori>
Status: CLOSED ERRATA QA Contact: Lucie Leistnerova <lleistne>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.2.5CC: gwatson, lsvaty, mgoldboi, mkalinin, mperina, ratamir, Rhev-m-bugs, rnori
Target Milestone: ovirt-4.2.7Keywords: ZStream
Target Release: 4.2.7   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.7.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1633310 Environment:
Last Closed: 2018-11-05 15:02:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1633310    
Bug Blocks:    

Description RHV bug bot 2018-10-02 12:31:54 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1633310 +++
======================================================================

Description of problem:

A customer had encountered problems with their VM backup utility, which resulted in multiple locked snapshots. They restarted the ovirt-engine service, and thereafter were unable to login to the Admin Portal, which displayed the following error in the browser window;

"(org.ovirt.engine.core.common.action.ActionType,org.ovirt.engine.core.common.action.ActionParametersBase,org.ovirt.engine.core.bll.context.CommandContext): javax.ejb.EJBException: org.apache.commons.lang.SerializationException: org.codehaus.jackson.map.JsonMappingException: No default constructor for [collection type; class java.util.HashMap$KeySet, contains [simple type, class org.ovirt.engine.core.compat.Guid]] (through reference chain: org.ovirt.engine.core.common.action.CreateSnapshotForVmParameters["diskIds"])"


The 'command-entities' table contained 124 entries with the 'command_params_class' field containing one of the following;

  - "org.ovirt.engine.core.common.action.CreateSnapshotForVmParameters"
  - "org.ovirt.engine.core.common.action.CreateSnapshotDiskParameters"


When these were removed, the Admin Portal became accessible.

 

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

RHV 4.2.5


How reproducible:

It happened every time until some 'command_entities' entries were removed from the database.


Steps to Reproduce:
1.
2.
3.

Actual results:

Admin Portal was inaccessible as a result of multiple snapshot creation failures.


Expected results:

Access to the Admin Portal should be allowed regardless of existing snapshot creation command entities.


Additional info:

(Originally by Gordon Watson)

Comment 5 RHV bug bot 2018-10-02 12:32:14 UTC
Ravi, is this the same issue as in BZ1588738 or do we need a different fix for that?

(Originally by Martin Perina)

Comment 6 RHV bug bot 2018-10-02 12:32:18 UTC
Posted a patch to fix the issue in BackendSnapshotsResource which was setting CreateSnapshotForVmParameters.setDiskIds with HashMap.keySet. This passes the internal class java.util.HashMap$KeySet to the serializer and jackson cannot deserialize the object.

(Originally by Ravi Shankar Nori)

Comment 9 Martin Perina 2018-10-02 12:34:15 UTC
*** Bug 1634035 has been marked as a duplicate of this bug. ***

Comment 12 Lucie Leistnerova 2018-10-11 12:03:39 UTC
Snapshots on down/up VM successfully created/deleted via API without any login issue.

Tested in ovirt-engine-4.2.7.1-0.1.el7ev.noarch

If you run into snapshot problem again, feel free to reopen this BZ.

Comment 14 errata-xmlrpc 2018-11-05 15:02: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:3480