Bug 1256730 - Failed to enable HA option on vm, that pinned to multiple hosts
Summary: Failed to enable HA option on vm, that pinned to multiple hosts
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.0
Hardware: All
OS: Linux
high
urgent
Target Milestone: ovirt-3.6.0-rc3
: 3.6.0
Assignee: Martin Sivák
QA Contact: Artyom
URL:
Whiteboard:
Depends On:
Blocks: 1107512
TreeView+ depends on / blocked
 
Reported: 2015-08-25 10:53 UTC by Artyom
Modified: 2016-04-20 01:10 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Previously, if a virtual machine was pinned to a host, you could not select the Highly Available check box for that virtual machine as high availability would not be able to operate properly. With Red Hat Enterprise Virtualization 3.6, multiple host pinning is supported and the rule has been updated to allow the Highly Available check box to be selected for virtual machines that are not pinned, pinned to any host (migration disabled, but can be started on any host), or pinned to multiple hosts. Note that in the last scenario, if all pinned hosts are down, the virtual machine won't have a host to start on.
Clone Of:
Environment:
Last Closed: 2016-04-20 01:10:12 UTC
oVirt Team: SLA
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 45383 0 master MERGED Enable VM high availability when multiple pinning hosts are selected Never
oVirt gerrit 47264 0 ovirt-engine-3.6 MERGED Enable VM high availability when multiple pinning hosts are selected Never
oVirt gerrit 47265 0 ovirt-engine-3.6.0 MERGED Enable VM high availability when multiple pinning hosts are selected Never

Description Artyom 2015-08-25 10:53:37 UTC
Description of problem:
Failed to enable HA option on vm, that pinned to multiple hosts

Version-Release number of selected component (if applicable):
rhevm-3.6.0-0.12.master.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create vm and pin it to two host
2. Try to enable HA option on vm
3.

Actual results:
Engine not give to enable HA option, because vm must have "Migration Options" equal to "Allow manual and automatic migration"

Expected results:
In case if vm pinned to number of hosts, we must allow to set vm as HA vm

Additional info:

Comment 1 Doron Fediuck 2015-08-26 13:23:30 UTC
Since there are multiple hosts available, HA should be allowed.
Note that HA should still be blocked if there's only a single host the
VM is pinned to.

Comment 2 Martin Sivák 2015-08-27 13:03:06 UTC
So what will happen in a situation like this:

Host A, Host B, Host C
VM is pinned to Host A and Host B and marked as highly available
Host A goes to maintenance (or down)
VM is started (-> Host B)
Host B goes down, breaking the HA configuration even though there is a third host still available

Comment 3 Doron Fediuck 2015-08-27 13:22:14 UTC
(In reply to Martin Sivák from comment #2)
> So what will happen in a situation like this:
> 
> Host A, Host B, Host C
> VM is pinned to Host A and Host B and marked as highly available
> Host A goes to maintenance (or down)
> VM is started (-> Host B)
> Host B goes down, breaking the HA configuration even though there is a third
> host still available

B will not go down before there's an available placement to the VM.
This is what happens today when you move a host to maintenance and
there's an HA running on that host and no other hosts available.

Comment 4 Martin Sivák 2015-08-27 14:28:10 UTC
B will go down if the hw fails or the power is out. And there is no way to start the HA VM afterwards even though the cluster still has one perfectly fine host.

The current code does not allow pinning at all for HA VMs and so it will behave better in this case. We might want to warn users that pinning a HA VM is not a good idea even though we allow that now.

Comment 5 Martin Sivák 2015-09-21 10:20:37 UTC
I am not sure we want to do this as the old behaviour relied strictly on whether the VM was migratable or not. The amount of pinned hosts does not really change anything here as we use that only for VM start.

There are basically two cases with multiple pinning:

- The VM is allowed to migrate and one or multiple hosts are selected -> HA is allowed independently on the pinning, the VM will try to start on any selected host or anywhere else

- The VM is not allowed to migrate -> we do not allow any migration at all and we did (3.5) not allow HA independently of the pin to host setting even in case of 'use any host' being set (which supersedes selecting multiple hosts).


That said, I have the patch that enables the multiple hosts, no migration allowed -> HA is still allowed flow, I am just not sure it is the right behaviour.

Comment 6 Artyom 2015-09-24 09:28:35 UTC
Update failed also via REST
have vm that pinned to two hosts and try to update it via REST(PUT action):
<vm>
<high_availability>true</high_availability>
</vm>

despite that REST return status ok(200), high_availability value of vm stay false
<high_availability>
<enabled>false</enabled>
<priority>1</priority>
</high_availability>

Comment 7 Roy Golan 2015-10-07 08:53:35 UTC
It is unclear how multiple pinning host and HA Vms interact. Should we 
consider hosts outside of the set or not?

Comment 8 Roy Golan 2015-10-07 13:14:02 UTC
Martin, after speaking with Doron we should allow HA if we have more than 1 Host available, no mater what the migration options are.

Comment 9 Martin Sivák 2015-10-07 14:42:56 UTC
Then explain to me the difference between:

A) Migration disabled, two hosts are selected (new in 3.6)
B) Migration disabled, no host is selected - meaning any host is fine (already possible in 3.5)

HA should be allowed in A according to what you tell me, but HA is not allowed in B and never was. And B allows you to choose even more hosts than A.

Comment 10 Doron Fediuck 2015-10-08 09:00:53 UTC
(In reply to Martin Sivák from comment #9)
> Then explain to me the difference between:
> 
> A) Migration disabled, two hosts are selected (new in 3.6)
> B) Migration disabled, no host is selected - meaning any host is fine
> (already possible in 3.5)
> 
> HA should be allowed in A according to what you tell me, but HA is not
> allowed in B and never was. And B allows you to choose even more hosts than
> A.

Let's review the migration support for HA VMs first;

Ver | pin to host(s) | preferred (default) host | allow any |
====|================|==========================|===========|
3.5 | not allowed    | allowed                  | allowed   |
3.6 | OK if >=2 hosts| allowed                  | allowed   |
=============================================================

This should be broken into the relevant options of "Start Running On"
and "Migration Options". In your scenario (A) is fine. (B) is preventing
the HA from working, so we should not allow it (either HA or completely
disable migration).

Comment 11 Artyom 2015-10-25 12:41:22 UTC
Verified on rhevm-3.6.0.2-0.1.el6.noarch
Succeed to enable HA option to vm that pinned to multiply hosts.
Also HA works as supposed.


Note You need to log in before you can comment on or make changes to this bug.