Bug 786104

Summary: Host with the same name\address can be added in parallel
Product: [Retired] oVirt Reporter: Ilanit Stein <istein>
Component: ovirt-engine-coreAssignee: Laszlo Hornyak <lhornyak>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, dfediuck, iheim, oramraz, ykaul, yzaslavs
Target Milestone: ---   
Target Release: 3.1   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-09 08:05:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ilanit Stein 2012-01-31 13:29:10 UTC
Description of problem:

It is possible to add same host twice on the setup, in parallel, in different data centers.

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

Steps to reproduce:

Just add in parallel same host (host with the same name and address), in different data centers.

Comment 1 Laszlo Hornyak 2012-02-06 13:55:53 UTC
http://gerrit.ovirt.org/1648

Comment 2 Yair Zaslavsky 2012-02-07 13:23:11 UTC
Adding the unique constraints is good.
I think we should prevent this in canDoAction level as well.

Comment 3 Laszlo Hornyak 2012-02-10 15:15:36 UTC
Yair, I checked it, VdsHandler.isVdsExist (line 100) already handles both cases. The error can only happen if the second thread passes this point before the first thread is persisted to the DB and it's transaction gets finished. Should be a few miliseconds if not heavily loaded. The datacenter is not used as a filter at validation, so this should not be a problem, hostnames and addresses should be unique even between datacenters.

Comment 4 Laszlo Hornyak 2012-06-14 10:58:28 UTC
Can we close this issue?

Comment 5 Itamar Heim 2012-06-14 12:01:42 UTC
(In reply to comment #4)
> Can we close this issue?

I exepct bugs will be closed as part of releasing oVirt 3.1

Comment 6 Itamar Heim 2012-08-09 08:05:50 UTC
closing ON_QA bugs as oVirt 3.1 was released:
http://www.ovirt.org/get-ovirt/