Bug 1208139

Summary: Import storage domain function is not setup to handle local disk hypervisors which has the same path
Product: Red Hat Enterprise Virtualization Manager Reporter: Allie DeVolder <adevolder>
Component: ovirt-engineAssignee: Maor <mlipchuk>
Status: CLOSED ERRATA QA Contact: lkuchlan <lkuchlan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, adevolder, amureini, colin.stuck, lpeer, lsurette, mlipchuk, rbalakri, Rhev-m-bugs, tnisan, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.0-rcKeywords: ZStream
Target Release: 3.6.0Flags: ylavi: Triaged+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1212397 (view as bug list) Environment:
Last Closed: 2016-03-09 21:01:42 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:
Bug Depends On:    
Bug Blocks: 1212397    

Description Allie DeVolder 2015-04-01 13:40:26 UTC
Description of problem:
When moving a localdisk hypervisor to a new rhev manager, we get the below error when trying to import a localdisk domain.

~~~
Import operation failed. Domain <another localdisk hypervisor storage domain> already exists in the system.
~~~

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

How reproducible:
Very

Steps to Reproduce:
1. Setup localdisk hypervisor1 on rhevmanager1 with a local storage path of /rhev_vms
2. Setup localdisk hypervisor2 on rhevmanager2 with a local storage path of /rhev_vms
3. Set hypervisor1 on rhevmanager1 to maintenance
4. Move hypervisor1 to rhevmanager2
4a. Create datacenter, cluster, and host objects
4b. For storage domain, choose import domain, and set the path to /rhev_vms

Actual results:
Fail to import domain with "Import operation failed. Domain <another localdisk hypervisor storage domain> already exists in the system."

Expected results:
Successful import

Additional info:

Comment 1 Maor 2015-04-14 08:53:48 UTC
Allan, 

I looks like the problem is that the Storage Domains are called with the same same name.
Is this indeed the case?

Comment 2 Maor 2015-04-14 09:04:36 UTC
(In reply to Maor from comment #1)
> Allan, 
> 
> I looks like the problem is that the Storage Domains are called with the
> same same name.
> Is this indeed the case?

ok, I saw now the problem, it is not related to the name but to the path which are the same.
please disregard the previous needinfo

Comment 3 Maor 2015-04-15 10:27:57 UTC
Allan, I assume the message came from the GUI, so I'm changing the component to webadmin-portal (if not, please let me know).

The fix changed the validation of existing paths, to be used on the same Data Center which the Storage Domain is being imported to.

Comment 4 Allon Mureinik 2015-04-16 06:15:30 UTC
Maor - the patch attached to this BZ is now merged. Can the BZ be cloned? (i.e., does this patch resolve the issue, or are we waiting for additional patches?)

Comment 5 Maor 2015-04-16 09:56:11 UTC
(In reply to Allon Mureinik from comment #4)
> Maor - the patch attached to this BZ is now merged. Can the BZ be cloned?
> (i.e., does this patch resolve the issue, or are we waiting for additional
> patches?)

Yep, I've already sent a mail about it

Comment 7 lkuchlan 2015-06-15 13:06:38 UTC
Tested using:
ovirt-engine-3.6.0-0.0.master.20150519172219.git9a2e2b3.el6.noarch
vdsm-4.17.0-912.git25a063d.el7.noarch

Verification instructions:
1. Setup localdisk hypervisor1 on rhevmanager1 with a local storage path of /rhev_vms
2. Setup localdisk hypervisor2 on rhevmanager2 with a local storage path of /rhev_vms
3. Set hypervisor1 on rhevmanager1 to maintenance
4. Move hypervisor1 to rhevmanager2
4a. Create datacenter, cluster, and host objects
4b. For storage domain, choose import domain, and set the path to /rhev_vms

Results:
Successful import

Comment 10 errata-xmlrpc 2016-03-09 21:01:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://rhn.redhat.com/errata/RHEA-2016-0376.html