Bug 1138115

Summary: [ImportDomain] The attach operation should issue a warning, if the Storage Domain is already attached to another Data Center in another setup
Product: Red Hat Enterprise Virtualization Manager Reporter: Maor <mlipchuk>
Component: ovirt-engineAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: lkuchlan <lkuchlan>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: acanan, amureini, gklein, juwu, lpeer, mlipchuk, rbalakri, Rhev-m-bugs, scohen, yeylon, ykaul
Target Milestone: ovirt-3.6.0-rcKeywords: ZStream
Target Release: 3.6.0Flags: amureini: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, when a user attached a storage domain that was already in use and managed by a different Manager, no warning was provided, and the action lead to potential metadata corruption. With this update, users are notified with a warning message that the intended storage domain is already attached to another data center managed in another Red Hat Enterprise Virtualization environment. The user can choose to continue and overwrite the metadata or to cancel the action.
Story Points: ---
Clone Of:
: 1176552 (view as bug list) Environment:
Last Closed: 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: 1176552    
Attachments:
Description Flags
image none

Description Maor 2014-09-04 06:18:13 UTC
Description of problem:
The attach operation should notify the user, a warning, whether the Storage Domain is already attached to another Data Center.
The user can then choose whether to run over the meta data or neglect his operation.

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


How reproducible:
100%

Steps to Reproduce:
1. Attach a Storage Domain already attached to another setup
2.
3.

Actual results:
Storage Domain will be attached and run over the former meta data 

Expected results:
We should add a warning indicating that the Storage Domain is already attached to another Data Center

Additional info:

Comment 1 Allon Mureinik 2014-09-04 11:23:40 UTC
Why a warning? Shouldn't we just block it?

Comment 2 Maor 2014-09-10 11:57:40 UTC
because the storage domain might be already attached to another working setup, or it can be part of the DR porocess

Comment 3 Allon Mureinik 2014-11-26 16:02:15 UTC
This is a very risky change, with a limited reward.
Pushing out.

Comment 5 Allon Mureinik 2015-03-31 07:07:45 UTC
Julie, Thanks for the doctext!
However, I think it's missing an important point - this BZ related to a storage domain that is connected to a data center in a *different setup* (i.e., a data center managed by a different engine).
If you attempt to attach a storage domain to a different data center in the same DC, you'll get a different error message, and will not be given the option to forecefully overwrite the metadata - you'd have to properly detach the domain from the data center first.

Comment 6 Kevin Alon Goldblatt 2015-04-29 07:41:57 UTC
Maor,

I seem to be missing something here.

In the steps to reproduce you wrote:
1. Attach a Storage Domain already attached to another setup

When I go to the Data Centre Tab - Press on Attach Data I get a message saying that there are no available Storage domains to attach. No external domains are displayed here

When creating a new storage domain you already attach it to a DC and then these storage domains are not displayed as available

So how do I reproduce this scenario?

Comment 7 Maor 2015-04-29 16:47:51 UTC
You should do the following:
1. Create a new setup with Storage Domain VMs and disks
2. Move the Storage Domain to maintenance
3. Create a new setup with a new DC, new Storage Domain and Host, so the Data Center will be active and initialized
4. import the old storage domain to the setup to the specific DC

 Expected result: You should see a warning when attaching the Storage Domain that it is already attached to a different Data Center

Comment 8 lkuchlan 2015-05-20 12:27:17 UTC
Created attachment 1027704 [details]
image

Tested using ovirt-engine-3.6.0-0.0.master.20150412172306.git55ba764.el6

Verification instructions:
1. Create a new setup with Storage Domain VMs and disks
2. Move the Storage Domain to maintenance
3. Create a new setup with a new DC, new Storage Domain and Host, so the Data Center will be active and initialized
4. import the old storage domain to the setup to the specific DC

Result: warning message should appear: "Storage Domain(s) are already attached to a Data Center. Approving this operation might cause data corruption if both Data Centers are active"

Comment 9 Allon Mureinik 2016-03-10 10:42:04 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 10 Allon Mureinik 2016-03-10 10:46:54 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 11 Allon Mureinik 2016-03-10 12:03:28 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE