Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1181681

Summary: Add rest API to support warning for attached Storage Domains on attach or import of Storage Domain
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-engine-cliAssignee: Maor <mlipchuk>
Status: CLOSED ERRATA QA Contact: lkuchlan <lkuchlan>
Severity: low Docs Contact:
Priority: low    
Version: 3.5.0CC: acanan, adahms, amureini, ecohen, gklein, iheim, lsurette, mlipchuk, oliel, rbalakri, rhev-integ, Rhev-m-bugs, tnisan, yeylon, ylavi
Target Milestone: ---Keywords: ZStream
Target Release: 3.5.1Flags: ylavi: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.5.1-1 Doc Type: Bug Fix
Doc Text:
This update adds the call 'isattached' to the REST API for detecting whether a storage domain is attached to a data center before attempting to import the storage domain. This functionality allows users to check if a storage domain is already attached to a storage pool before importing it to a new environment, thereby preventing corruption in the data of a storage domain that is already activated in a different environment. IMPORTANT: When executed, the call causes the storage domain to become disconnected from the host where the call is executed.
Story Points: ---
Clone Of: 1179246 Environment:
Last Closed: 2015-04-28 18:43:56 UTC Type: ---
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: 1179246    
Bug Blocks: 1193058, 1197441    
Attachments:
Description Flags
logs none

Comment 1 Allon Mureinik 2015-01-20 23:08:18 UTC
Maor, I see two patches merged to the 3.5 branch.
Are there any other patches required, or should this be moved to MODIFIED?

Comment 2 Maor 2015-01-21 13:18:22 UTC
There is one more patch that need to be merged before moving this to modify

Comment 3 Maor 2015-01-21 17:18:05 UTC
Moving to NEW for now until a proper solution will be resolved through gerrit

Comment 4 Ori Gofen 2015-03-04 14:31:32 UTC
Maor, you wrote at the doc text:
"Result: 
Adding an API for storage domain which called isattached
IMPORTANT: Executing this API will cause the Storage Domain to disconnected from the Host executing this API" 

does this mean that everytime a user executes 'isattached' and expects to get 'True' or 'False it will cause also the Storage Domain to disconnected from the Host executing this API" ?

Comment 5 Maor 2015-03-04 16:47:01 UTC
(In reply to Ori Gofen from comment #4)
> Maor, you wrote at the doc text:
> "Result: 
> Adding an API for storage domain which called isattached
> IMPORTANT: Executing this API will cause the Storage Domain to disconnected
> from the Host executing this API" 
> 
> does this mean that everytime a user executes 'isattached' and expects to
> get 'True' or 'False it will cause also the Storage Domain to disconnected
> from the Host executing this API" ?

yes

Comment 6 Ori Gofen 2015-03-05 12:17:04 UTC
Created attachment 998337 [details]
logs

Maor, this function looks like a bug, no sane user will ever use it.
just tried to "query" 'isattach' operation on a storage domain.
the operation returned 'True' and after on second the whole dc became None-Responsive (see image and logs) and ERRORs and Tracebacks on all logs

Comment 7 lkuchlan 2015-03-11 12:53:22 UTC
Tested using rhevm-3.5.1-0.1.el6ev, vdsm-4.16.12-2.el7ev.x86_64

Comment 8 errata-xmlrpc 2015-04-28 18:43:56 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/RHSA-2015-0888.html