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:
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