Bug 1550422

Summary: It's possible to import storage domain with same name as master storage domain
Product: [oVirt] ovirt-engine Reporter: Ondra Machacek <omachace>
Component: BLL.StorageAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Evelina Shames <eshames>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.2CC: amureini, bugs, ebenahar, lveyde, mlipchuk, omachace, ylavi
Target Milestone: ovirt-4.2.2Flags: rule-engine: ovirt-4.2+
ylavi: exception+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:19:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
api/storagedomains
none
engine.log none

Description Ondra Machacek 2018-03-01 09:05:20 UTC
Created attachment 1402341 [details]
api/storagedomains

Description of problem:
When there is a master storage domain with name 'data' in the system, and we import another storage domain with name 'data', all succeed and we have two storage domains with name 'data'.


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

How reproducible:
always

Steps to Reproduce:
1. Create master storage domain with name 'data'.
2. Import another storage data domain with name 'data'

Actual results:
success

Expected results:
success, but should be possible to activate I guess

Additional info:

Comment 1 Maor 2018-03-01 09:21:30 UTC
Ondra, can you please attach the engine logs

Comment 2 Ondra Machacek 2018-03-01 09:26:14 UTC
Created attachment 1402344 [details]
engine.log

Comment 3 Maor 2018-03-01 11:26:21 UTC
I've been trying to reproduce this on my env although I keep getting the same validation message of ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST.
Is there any chance you can reproduce this on your env again to know if this is consistent or not?

Comment 4 Maor 2018-03-01 11:41:26 UTC
I managed to reproduce it now.
It does reproduce when importing a domain from the GUI without indicating the storage domain name in the textbox

Comment 5 Evelina Shames 2018-03-18 15:48:19 UTC
Verified.

(Created master storage domain with name 'data' and imported another storage data domain with the same name without indicating the storage domain name in the textbox > Activated the domain > Two storage domains with name 'data'. Is this OK? )

Comment 6 Evelina Shames 2018-03-18 16:08:47 UTC
engine - 4.2.2.2-0.1.el7
vdsm - 4.20.19-1.el7ev.x86_64

Comment 7 Maor 2018-03-19 15:22:14 UTC
(In reply to Evelina Shames from comment #5)
> Verified.
> 
> (Created master storage domain with name 'data' and imported another storage
> data domain with the same name without indicating the storage domain name in
> the textbox > Activated the domain > Two storage domains with name 'data'.
> Is this OK? )

You should fail and get a CDA message indicating this storage domain name already exists.
I see that Lev mentioned that it is fixed In Version: ovirt-engine-4.2.2.4, so could it be that this fix (see [1]) does not exists in 4.2.2.2-0.1.el7 ?

[1] https://github.com/oVirt/ovirt-engine/commit/5f1ca1f225c4b991158c782d2d5cb5af832f1cbc

Comment 8 Sandro Bonazzola 2018-03-29 11:19:47 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.