Bug 1303163 - Cannot login after upgrade from 3.5 to 3.6
Summary: Cannot login after upgrade from 3.5 to 3.6
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 3.6.1.3
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-3.6.3
: 3.6.3.1
Assignee: Eli Mesika
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-29 18:15 UTC by Marcelo Leandro
Modified: 2016-02-18 11:14 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:14:39 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: exception+
mgoldboi: planning_ack+
rule-engine: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)
engine.log, server.log and setup.log (377.54 KB, application/x-gzip)
2016-01-29 18:15 UTC, Marcelo Leandro
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 52904 0 master MERGED core: cleanup cmd data when compensation deleted 2016-02-02 08:52:27 UTC
oVirt gerrit 52955 0 ovirt-engine-3.6 MERGED core: cleanup cmd data when compensation deleted 2016-02-03 09:15:30 UTC
oVirt gerrit 52956 0 ovirt-engine-3.6.3 MERGED core: cleanup cmd data when compensation deleted 2016-02-03 09:24:31 UTC

Description Marcelo Leandro 2016-01-29 18:15:18 UTC
Created attachment 1119492 [details]
engine.log, server.log and setup.log

After engine-setup from ovirt-engine-3.5.6.2-1.el7.centos to ovirt-engine-3.6.1.3-1.el7.centos, I'm not able to login anymore. The
engine.log says:
 
Caused by: org.codehaus.jackson.map.JsonMappingException: Invalid type id 'org.ovirt.engine.core.common.businessentities.DiskImage' (for id
type 'Id.class'): no such class found (through reference chain: org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters["vm"]->org.ovirt.engine.core.common.businessentities.VM["diskList"])
 
After some mailing list discussion, seems like the issue was identified:
 
"CommandBase tries to execute LoginCommand, but before the command execution it loads content of commands cache and here comes the issue:  here's stored AddVmFromSnapshotCommand which contains DiskImage as a parameter and DiskImage implementation has changed between 3.5 and 3.6."
 
and
 
"The problem is in the command_entities table that is not cleaned up and has two records after taskcleaner.sh is invoked by engine-setup.
Since engine tries to deserialize classes defined in this table and as Martin noted changes between 3.5 and 3.6 changed some classes, we got this exception.
We should not allow leftovers to exists in this table during the upgrade process and taskcleaner utility should handle that as well."
 
The workaround seems to be:
 
Run the following before the upgrade
 psql -U engine -c "DELETE from command_entities;" <database name>
 
Additional question:
 
My concern now is that I have already upgraded to 3.6, so now I wonder if there's some post upgrade workaround.

Comment 1 Yedidyah Bar David 2016-01-31 07:52:20 UTC
Moving to Eli as per the discussion on the mailing list. Thanks for the report.

Comment 2 Red Hat Bugzilla Rules Engine 2016-01-31 22:50:09 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 3 Gonza 2016-02-18 10:49:30 UTC
Verified with upgrade from:
rhevm-3.5.8-0.1.el6ev.noarch
to: 
rhevm-3.6.3.1-0.1.el6.noarch

Started a template import and once there were entries on command_entities table I stopped the ovirt-engine service.
Ran engine-setup and came across the following:
[ INFO  ] Cleaning async tasks and compensations
          The following system tasks have been found running in the system:
          Task ID:           ac0462e5-f18e-4492-a2d1-4e794c01ebf3
          Task Name:         ImportVmTemplateCommand       
          Task Description:  Importing a temaplte from an export domain
          Started at:        30
          DC Name:           Default                       
          The following commands have been found running in the system:
          The following compensations have been found running in the system:
          Would you like to try to wait for that?
          (Answering "no" will stop the upgrade (Yes, No) Yes

Execution of setup completed successfully
Web Admin is accessible and I am able to login.


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