Bug 1177247

Summary: [engine-backend] [importDomain] [hosted-engine] import to the hostged engine storage domain (NFS) is allowed
Product: Red Hat Enterprise Virtualization Manager Reporter: Elad <ebenahar>
Component: ovirt-engineAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, ecohen, gklein, iheim, lpeer, lsurette, rbalakri, Rhev-m-bugs, scohen, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.5.0-28 Doc Type: Bug Fix
Doc Text:
Import of a data storage domain that has the name of the self hosted engine (hosted_storage by default) will be blocked by the backend. Since the storage name can be changed in the HE installation, this value is taken from the configuration in case it is different that the default (the option name is HostedEngineStorageDomainName)
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-16 19:09:17 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:
Bug Depends On:    
Bug Blocks: 1164308, 1164311    
Description Flags
screenshot from webadmin, db dump and hosted engine setup logs none

Description Elad 2014-12-25 11:42:38 UTC
Created attachment 972980 [details]
screenshot from webadmin, db dump and hosted engine setup logs

Description of problem:
An attempt to import the storage domain which is being used for the hosted-engine image is not blocked by the engine. 

I'm reporting this bug so there will be a solution for this flow while using NFS.

https://bugzilla.redhat.com/show_bug.cgi?id=1157243 refers to the iSCSI case.

Version-Release number of selected component (if applicable):
rhev 3.5 vt13.5

How reproducible:

Steps to Reproduce:
1. Deploy hosted-engine (NFS)
2. When the engine is up and running, import a data domain and specify the export path which is used by the hosted engine. 

Actual results:
The import operation is allowed, there is no validation if this domain is being used by the hosted engine for the engine image.
proceeding with the import would overwrite the metadata of the storage domain and the setup would be destroyed. (Tried it)

Expected results:
There should be a validation to check if the path holds a storage domain which is used for hosted engine. 

Additional info: screenshot from webadmin, db dump and hosted engine setup logs

Comment 1 Elad 2015-01-11 14:21:33 UTC
An attempt to import the hosted engine storage domain while using NFS is now blocked on CanDoAction (the storage domain name is the default):

2015-01-11 14:19:13,994 WARN  [org.ovirt.engine.core.bll.storage.AddExistingFileStorageDomainCommand] (ajp-/ [4f60b55d] CanDoAction of action AddExistingFileStorageDomain failed. Reasons:VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__ADD,ACTION_TYPE_FAILED_HOSTED_ENGINE_STORAGE

Verified using rhev3.5 vt13.6

Comment 2 Allon Mureinik 2015-02-16 19:09:17 UTC
RHEV-M 3.5.0 has been released, closing this bug.