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

Bug 1298697

Summary: The engine let the user remove the last regular storage domain
Product: [oVirt] ovirt-engine Reporter: Simone Tiraboschi <stirabos>
Component: BLL.HostedEngineAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.6.1.3CC: bugs, dfediuck, didi, lveyde, mavital, mgoldboi, rgolan, rmartins, sbonazzo, stirabos
Target Milestone: ovirt-3.6.3Keywords: Regression, Triaged
Target Release: 3.6.3.1Flags: rule-engine: ovirt-3.6.z+
rule-engine: blocker+
mgoldboi: planning_ack+
dfediuck: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The hosted engine as a master storage domain cannot act as a master storage domain Consequence: Some storage actions couldn't be made when we lack SPM on that domain. Fix: Prevent the hosted engine sd from being selected as master domain. User must create or pick another domain for that. Result: The hosted engine storage domain will never function as a master domain. Users must add or pick a data domain other than the hosted engine one.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 11:07:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Simone Tiraboschi 2016-01-14 18:27:13 UTC
Description of problem:
The engine let the user remove the last regular storage domain.
Hosted-engine storage domain becomes the master storage domain.

After a reboot it's not possible to add again another regular storage domain:
Error while executing action: Failed to activate Storage due to an error on the Data Center master Storage Domain.
-Please activate the master Storage Domain first.


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

How reproducible:
100%

Steps to Reproduce:
1. deploy hosted-engine
2. add the first regular storage domain
3. let the engine import the hosted-engine storage domain
4. remove the regular storage domain
5. reboot

Actual results:
The engine let the user remove the last regular storage domain (the hosted engine one is here but it's a special one) and the hosted-engine storage domain become the master storage domain.
This prevent further storage actions after a reboot since we have no SPM.

Expected results:
the engine doesn't allow the user to remove the last regular storage domain (the hosted-engine one is not a regular storage domain)

Additional info:

Comment 3 Artyom 2016-02-17 16:44:08 UTC
Verified on rhevm-3.6.3.1-0.1.el6.noarch
Now not possible to remove master storage domain if engine has only additional HE storage domain, but from the patch I can see, that check depends on HE storage domain name, so if we will change via engine-config
engine-config -s HostedEngineStorageDomainName=he_storage we will encounter again the same problem
Maybe it is better to add some additional flag to storage domain table in database, is_he_storage_domain, true or false