Bug 1836034

Summary: Cannot switch Master to hosted_storage
Product: Red Hat Enterprise Virtualization Manager Reporter: Germano Veit Michel <gveitmic>
Component: ovirt-engineAssignee: Bella Khizgiyaev <bkhizgiy>
Status: CLOSED ERRATA QA Contact: Evelina Shames <eshames>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.0CC: aefrat, eslutsky, izuckerm, michal.skrivanek, mkalinin, sbonazzo, sfishbai, stirabos, tnisan
Target Milestone: ovirt-4.4.3Flags: izuckerm: testing_plan_complete-
Target Release: 4.4.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.3.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-26 12:06: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:
Embargoed:

Description Germano Veit Michel 2020-05-15 01:28:23 UTC
Description of problem:

Since 4.2, new installations deploy hosted_storage as Master to start with, without the need for an additional SD to initialize the DC (which becomes master).

Currently, the way to change the Master role is to put the current Master in maintenance. But a user cannot get hosted_storage as master on systems initially installed on older versions, as it is not eligible to become master. What happens is that instead of the engine picking up hosted_storage as the new master, the DC simply goes into maintenance.

Due to this:
https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/StorageDomainCommandBase.java#L333

Which was introduced several years ago by:

~~~
commit c11bb0874aa1948724b35ebd367456e5fb5b75c1
Date:   Mon Jan 18 14:52:06 2016 +0200

    core: hosted engine: Avoid choosing the hosted engine sd as master
    
    Hosted engine domain will be under domain-monitoring in bootstrap mode and
    when there is no pool and that prevents VDSM in connecting it to the
    pool. to avoid further locking and special treatment we have for SPM we
    would completly avoid using that domain as master.
    
    Change-Id: Idd42aa656bea838059aaa274c91e7a5400b3b797
    Bug-Url: https://bugzilla.redhat.com/1298697
~~~

Does this still make sense? HE deployment is different now, and hosted_storage is Master on any new installation.

Version-Release number of selected component (if applicable):
rhvm-4.4.0-0.34.master.el8ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install standalone RHV-M
2. Add 2 Storage Domains
3. Send one SD to maintenance, the other becomes master
4. Activate again
5. Create VM named "HostedEngine", with a disk on the non-master SD
6. Make it a fake hosted-engine (so that is_hosted_engine_storage is True)
   engine=# update vm_static set origin=5 where vm_name='HostedEngine';
7. Switch the Master to maintenance
8. Now the entire DC is in maintenance, the remaining SD is up but did not pickup the master role.

Actual results:
DC is in maintenance, hosted_storage not master

Expected results:
DC is Active, hosted_storage is master

Comment 2 Tal Nisan 2020-05-18 14:20:55 UTC
Sandro, what do you think?

Comment 3 Sandro Bonazzola 2020-06-01 10:02:26 UTC
(In reply to Tal Nisan from comment #2)
> Sandro, what do you think?

I can't give any input on this. Redirecting the question to Evgeny.

Comment 5 Evgeny Slutsky 2020-06-15 15:21:15 UTC
I'm not that familiar with that  flow,
maybe Simone can shade some light.

Comment 6 Simone Tiraboschi 2020-06-29 15:18:00 UTC
(In reply to Evgeny Slutsky from comment #5)
> I'm not that familiar with that  flow,
> maybe Simone can shade some light.

Technically I don't see any reason why the engine should prevent anymore the hosted-engine storage domain from being the master one.

Comment 7 Evelina Shames 2020-09-14 14:16:58 UTC
Verified on ovirt-engine-4.4.3.2-0.19.

Comment 8 Michal Skrivanek 2020-11-26 12:06:17 UTC
this shipped in https://access.redhat.com/errata/RHSA-2020:5179