Bug 1550422 - It's possible to import storage domain with same name as master storage domain
Summary: It's possible to import storage domain with same name as master storage domain
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.2
: ---
Assignee: Maor
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-01 09:05 UTC by Ondra Machacek
Modified: 2018-03-29 11:19 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.2.2.4
Clone Of:
Environment:
Last Closed: 2018-03-29 11:19:47 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+
ylavi: exception+


Attachments (Terms of Use)
api/storagedomains (7.14 KB, text/plain)
2018-03-01 09:05 UTC, Ondra Machacek
no flags Details
engine.log (237.56 KB, text/plain)
2018-03-01 09:26 UTC, Ondra Machacek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 88343 0 master MERGED core: Revalidate duplicate name on import file SD 2018-03-08 10:06:33 UTC
oVirt gerrit 88642 0 ovirt-engine-4.2 MERGED core: Revalidate duplicate name on import file SD 2018-03-09 14:03:39 UTC

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.


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