Bug 1243125 - Upgrade of oVirt 3.5 to 3.6-master fails
Summary: Upgrade of oVirt 3.5 to 3.6-master fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: ---
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Yedidyah Bar David
QA Contact: Lukas Svaty
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-14 20:30 UTC by Martin Perina
Modified: 2015-11-27 07:53 UTC (History)
17 users (show)

Fixed In Version: 3.6.0-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-27 07:53:53 UTC
oVirt Team: ---
Embargoed:
rule-engine: ovirt-3.6.0+
rule-engine: blocker+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
engine logs (280.73 KB, application/x-gzip)
2015-07-14 20:30 UTC, Martin Perina
no flags Details
log for upgrade 3.6-3 -> 3.6-4 (1.49 MB, application/x-gzip)
2015-07-28 12:22 UTC, Lukas Bednar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 44171 0 master MERGED packaging: dbutils: Restore taskcleaner_sp_3_5.sql Never

Description Martin Perina 2015-07-14 20:30:10 UTC
Created attachment 1052033 [details]
engine logs

Description of problem:

Upgrade of oVirt 3.5.3 to oVirt 3.6 master fails with error during taskcleaner execution:

  Failed to execute stage 'Setup validation': Failed to clear zombie commands. Please access support in attempt to resolve the problem

Following error appears in corresponding setup log:

  ERROR:  function deleteallcommandswithzombietasks() does not exist
  LINE 1: SELECT DeleteAllCommandsWithZombieTasks();
               ^
  HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
  FATAL: Cannot execute sql command: --command=SELECT DeleteAllCommandsWithZombieTasks();

  2015-07-14 17:25:55 DEBUG otopi.context context._executeMethod:155 method exception
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/otopi/context.py", line 145, in _executeMethod
      method['method']()
    File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py", line 458, in _validateZombies
      self._clearZombies()
    File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py", line 146, in _clearZombies
      'Failed to clear zombie commands. '


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

3.5.3.1

How reproducible:

100%

Steps to Reproduce:
1. Install oVirt 3.5.3
2. Run engine-setup
3. Install oVirt 3.6 master
4. Run engine-setup

Actual results:

engine-setup fails after upgrade to oVirt 3.6 master

Expected results:

engine-setup is completed successfully after upgrade to oVirt 3.6 master

Additional info:

Comment 1 Lukas Bednar 2015-07-28 12:22:01 UTC
Created attachment 1057004 [details]
log for upgrade 3.6-3 -> 3.6-4

Comment 2 Lukas Bednar 2015-07-28 12:22:20 UTC
It fails on upgrade between minor releases too.
ovirt 3.6.0-3 -> 3.6.0-4

I was told that may be related to unfinished tasks in database.
I was able to find two stucked tasks there (Removing XYZ from system), both in 'Finalizing' stage.

See attached logs for this case.

Comment 3 Martin Perina 2015-07-28 12:52:31 UTC
The database was in a clean state (just after successful engine-setup) in original scenario, so definitely without any unfinished tasks.

Looking at the error it seems that stored procedure DeleteAllCommandsWithZombieTasks was removed/renamed during 3.6 development, but it's still called during upgrade.

Comment 4 Michal Skrivanek 2015-07-28 13:10:55 UTC
(In reply to Lukas Bednar from comment #2)
> It fails on upgrade between minor releases too.
> ovirt 3.6.0-3 -> 3.6.0-4
> 
> I was told that may be related to unfinished tasks in database.
> I was able to find two stucked tasks there (Removing XYZ from system), both
> in 'Finalizing' stage.

That is a separate issue which deserves investigation on its own. There should be no orphaned/unfinished tasks left. Oved, would you please look into that too and perhaps track it separately?

Comment 5 Oved Ourfali 2015-07-28 13:24:38 UTC
(In reply to Michal Skrivanek from comment #4)
> (In reply to Lukas Bednar from comment #2)
> > It fails on upgrade between minor releases too.
> > ovirt 3.6.0-3 -> 3.6.0-4
> > 
> > I was told that may be related to unfinished tasks in database.
> > I was able to find two stucked tasks there (Removing XYZ from system), both
> > in 'Finalizing' stage.
> 
> That is a separate issue which deserves investigation on its own. There
> should be no orphaned/unfinished tasks left. Oved, would you please look
> into that too and perhaps track it separately?

As far as I know this was fixed already by Liran.
Perhaps they indeed weren't finished?
CC-ing Liran.

Comment 6 Oved Ourfali 2015-07-29 16:57:12 UTC
No need for needinfo here on Liran, as it is not the issue reported in the original. 

Is upgrade from ovirt 3.5 to latest 3.6 master work? If so, this should be moved to verified. 

Now, we did some fixed with regards to stuck jobs on 3.6. That has nothing to do with 3.5 to 3.6 upgrade. 

An issue upgrading 3.6.0-3 to 3.6 master can't be an urgent issue....

So, please verify the original use-case.

Comment 7 Oved Ourfali 2015-07-29 16:59:34 UTC
Lukas, if there is an issue between 3.6.0-3 to 3.6.0-master,please open a separate bug on that.

Comment 8 ian 2015-07-29 18:00:28 UTC
I can confirm that I also had this issue when upgrading from 3.5.3 to 3.6.0-master.

Only way around was to follow instructions here: https://bugzilla.redhat.com/show_bug.cgi?id=1235707#c9

Comment 9 Oved Ourfali 2015-07-29 18:42:30 UTC
The missing sql functions issue?
When did you take master? Today?

Comment 10 Oved Ourfali 2015-07-29 19:10:51 UTC
Examining the issue, it was introduced by commit:
https://gerrit.ovirt.org/#/c/42943

Comment by Eli specifically warns from that, but Didi replies that it won't break the upgrade
Question in:
https://gerrit.ovirt.org/#/c/42943/3/packaging/setup/dbutils/taskcleaner_sp_3_5.sql

Explanation in:
https://gerrit.ovirt.org/#/c/42943/3/packaging/setup/dbutils/taskcleaner.sh

Didi, seems like it does break.
Currently, no one creates this stored procedure.

Can you take a look?

Comment 11 Yedidyah Bar David 2015-07-30 07:48:11 UTC
Sorry :-(

Comment 12 Red Hat Bugzilla Rules Engine 2015-09-22 07:43:42 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 13 Lukas Svaty 2015-11-18 13:51:07 UTC
verified with rhevm-setup-plugins-3.6.0-1.el6ev.noarch

Comment 14 Sandro Bonazzola 2015-11-27 07:53:53 UTC
Since oVirt 3.6.0 has been released, moving from verified to closed current release.


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