Bug 1633310

Summary: 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: Gordon Watson <gwatson>
Component: ovirt-engineAssignee: Ravi Nori <rnori>
Status: CLOSED ERRATA QA Contact: Lucie Leistnerova <lleistne>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.5CC: lsvaty, mgoldboi, mperina, Rhev-m-bugs, rnori, sirao
Target Milestone: ovirt-4.3.0Keywords: ZStream
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.0_alpha Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1634035 1635229 (view as bug list) Environment:
Last Closed: 2019-05-08 12:38:22 UTC Type: Bug
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:    
Bug Blocks: 1634035, 1635229    

Description Gordon Watson 2018-09-26 16:03:29 UTC
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:

Comment 5 Martin Perina 2018-09-27 07:16:08 UTC
Ravi, is this the same issue as in BZ1588738 or do we need a different fix for that?

Comment 6 Ravi Nori 2018-09-27 15:32:33 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.

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

verified in ovirt-engine-4.3.0-0.5.alpha1.el7.noarch

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

Comment 13 errata-xmlrpc 2019-05-08 12:38:22 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/RHEA-2019:1085

Comment 14 Lucie Leistnerova 2019-06-26 06:52:23 UTC
Running sanity for creating/deleting snapshot should test it.