Bug 1177595 - ActivateDeactivateSingleAsyncOperationFactory relies on concrete return type
Summary: ActivateDeactivateSingleAsyncOperationFactory relies on concrete return type
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: m1
: 3.6.0
Assignee: Liron Aravot
QA Contact: lkuchlan
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-29 09:56 UTC by Dima Kuznetsov
Modified: 2016-03-10 06:15 UTC (History)
10 users (show)

Fixed In Version: ovirt-engine-3.6.0-0.0.master.20150412172306.git55ba764
Clone Of:
Environment:
Last Closed: 2015-11-04 11:26:13 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)
engine.log with the error (411.57 KB, text/plain)
2014-12-29 09:56 UTC, Dima Kuznetsov
no flags Details
dump of the database (133.13 KB, application/x-bzip)
2014-12-29 10:09 UTC, Dima Kuznetsov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 36525 0 master MERGED core: ActivateDeactivateSingleAsyncOperationFactory- wrong type Never

Description Dima Kuznetsov 2014-12-29 09:56:44 UTC
Created attachment 973986 [details]
engine.log with the error

Description of problem:


Version-Release number of selected component (if applicable):
Nightly engine+vdsm rpms
vdsm-4.17.0-211.gite9e948b.el6.x86_64
ovirt-engine-3.6.0-0.0.master.20141228191127.git830baa2.el6

How reproducible:


Steps to Reproduce:
1. Add a storage domain to cluster without any existing storage domains
2. Maintenance it
3.

Actual results:
Error

Expected results:
Storage domain is put into maintenance

Additional info:

Comment 1 Dima Kuznetsov 2014-12-29 10:09:29 UTC
Created attachment 973987 [details]
dump of the database

Comment 2 Liron Aravot 2014-12-31 15:35:09 UTC
The bug seems to be cause by a different used version of spring jdbc.
the implementation sometimes relies  on that spring jdbc returns a arraylist (though it's not declared in the interface), while in other versions linkedlist is returned.

we should fix all of those places regardless- but we should look into when and decide if we want to force a specific version that we know that works as the code expected.

adding needinfo? on oved as this may occur in more places.

i made a quick search on -
instanceof ArrayList and found 12 occurrences.

Comment 3 Alon Bar-Lev 2014-12-31 16:58:11 UTC
I prefer we fix this based on documented behavior instead of blindly bump the spring-jdbc. These kind of issues are important enough to push it into 3.5.1.

I guess what you seek is instance of collection?

Comment 4 Liron Aravot 2015-01-01 14:40:34 UTC
I had local git branches problem, this bug could be easily caused by spring-jdbc changes (internal implementation), but specifically in our case it was caused by this patch -
http://gerrit.ovirt.org/#/c/27578/ that always returns a linkedlist instead of an arraylist while the outer implemention relies on the concrete type.

moving this one to infra, in the meanwhile i'm also fixing the storage related places that relied on the concrete return type.

Comment 5 Alon Bar-Lev 2015-01-01 14:44:48 UTC
Not sure why you fix only the storage related, someone should fix all violation of spring-jdbc usage within single commit. I also not sure why this kind of issue is postponed to 3.6.

Comment 6 Liron Aravot 2015-01-01 14:56:37 UTC
Alon, I'm postponing it to 3.6 as the patch that changed the return value type was merged for 3.6.

The code that relies on the concrete return type existed since version 3.0 there, while it should be fixed - it never caused issues, the issue was caused by the patch that i provided link to in my last comment.

As the danger existed always but the actual issue is relevant only for 3.6 after this change, I changed the target. The relevant changes can be made and then it'll be decided if we want them for 3.5 or not.

Comment 7 Alon Bar-Lev 2015-01-01 14:59:21 UTC
ok, thanks for explaining!
should this be moved to emesika?

Comment 8 Liron Aravot 2015-01-01 16:14:42 UTC
Alon, np.
emesika already opened a different bug for infra - so i'll use that one for the storage related fix. moving back to storage.

Comment 9 Allon Mureinik 2015-01-01 16:31:52 UTC
Can you please fix the subject to account for your latest findings? Thanks!

Comment 10 lkuchlan 2015-04-19 15:06:56 UTC
Tested using ovirt-engine-3.6.0-0.0.master.20150412172306.git55ba764

Comment 12 Sandro Bonazzola 2015-11-04 11:26:13 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.


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