Bug 921578

Summary: [rhevm-upgrade] fails detecting running async tasks
Product: Red Hat Enterprise Virtualization Manager Reporter: Sandro Bonazzola <sbonazzo>
Component: ovirt-engine-setupAssignee: Alex Lourie <alourie>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.2.0CC: acathrow, alourie, bazulay, dbotzer, dyasny, emesika, iheim, mgoldboi, oramraz, Rhev-m-bugs, sbonazzo, sgrinber, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: sf12 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: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 877749    

Description Sandro Bonazzola 2013-03-14 13:17:01 UTC
While testing bug #877749 it has been noted that rhevm-upgrade fails detecting running async tasks.

It seems that the output from "select * from fn_db_get_async_tasks()" is changed and upgrade-engine can't detect active tasks correctly.
It searched for the string RECORD in the output of the query but it seems that the keyword is not present anymore.

Comment 2 Moran Goldboim 2013-03-14 13:31:03 UTC
another dup of the problem?

Comment 5 Alex Lourie 2013-03-17 11:11:59 UTC
No, this is not a dup.

The problem is in a wrong parsing of the output of the SELECT command.

The suggested solution:

1. Run the SELECT query with COUNT() statement and compare to 0.
2. If >0, run again without COUNT and display the results.
3. If ==0, return ''.

This way we won't have to really parse the text output from the SQL query.

Comment 6 Sandro Bonazzola 2013-03-18 07:43:44 UTC
(In reply to comment #5)

> The suggested solution:
> 
> 1. Run the SELECT query with COUNT() statement and compare to 0.
> 2. If >0, run again without COUNT and display the results.
> 3. If ==0, return ''.

Looks good to me. The same solution should be applied also to compensations.

Comment 7 Sandro Bonazzola 2013-03-21 07:27:16 UTC
patch http://gerrit.ovirt.org/13131 merged upstream master: http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=9d1a0ae62da705e63484b50fdde724f63563c23f

Can't add the reference to External Trackers

Comment 10 Itamar Heim 2013-06-11 08:20:25 UTC
3.2 has been released

Comment 11 Itamar Heim 2013-06-11 08:23:53 UTC
3.2 has been released