Bug 949229

Summary: [engine-backend] delete_async_tasks_and_compensation_data.sql exits on KeyError
Product: Red Hat Enterprise Virtualization Manager Reporter: Elad <ebenahar>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul, yzaslavs
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: sf13.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Elad 2013-04-07 06:42:24 UTC
Description of problem:
delete_async_tasks_and_compensation_data.sql exits on KeyError:

[root@elad-rhevm32 dbscripts]# psql -U postgres engine -f delete_async_tasks_and_compensation_data.sql 
Password for user postgres: 
psql:delete_async_tasks_and_compensation_data.sql:1: ERROR:  cannot truncate a table referenced in a foreign key constraint
DETAIL:  Table "async_tasks_entities" references "async_tasks".
HINT:  Truncate table "async_tasks_entities" at the same time, or use TRUNCATE ... CASCADE.
  

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

rhevm-dbscripts-3.2.0-10.18.beta2.el6ev.noarch
rhevm-backend-3.2.0-10.18.beta2.el6ev.noarch


How reproducible:
100%

Steps to Reproduce:
1.On engine: Run:
 psql -U postgres engine -f delete_async_tasks_and_compensation_data.sql 

  
Actual results:
delete_async_tasks_and_compensation_data.sql exits on KeyError

Expected results:
delete_async_tasks_and_compensation_data.sql should succeed

Comment 1 Barak 2013-04-07 13:16:01 UTC
Why did you execute this script in the first place ?

What was the problem scenario you were trying to solve ?

Comment 2 Eli Mesika 2013-04-07 20:04:43 UTC
(In reply to comment #1)
> Why did you execute this script in the first place ?
> 
> What was the problem scenario you were trying to solve ?

Double checked that.
This script is called via the pre-upgrade step
Bug is valid , I will handle that ASAP

Comment 3 Eli Mesika 2013-04-09 13:53:08 UTC
fixed in commit: 568d77e

Comment 5 Leonid Natapov 2013-04-14 12:39:31 UTC
sf 13.1

Comment 6 Itamar Heim 2013-06-11 08:31:56 UTC
3.2 has been released

Comment 7 Itamar Heim 2013-06-11 08:32:03 UTC
3.2 has been released

Comment 8 Itamar Heim 2013-06-11 08:33:15 UTC
3.2 has been released