Bug 1404987

Summary: [RFE] Provide a way to auto-start VMs pinned to a host when host boots
Product: Red Hat Enterprise Virtualization Manager Reporter: François Cami <fcami>
Component: RFEsAssignee: Martin Tessun <mtessun>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.5CC: bugs, fcami, lsurette, michal.skrivanek, mtessun, rbalakri, s.kieske, srevivo, usurse, ykaul, ylavi
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-10 14:35:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description François Cami 2016-12-15 10:15:14 UTC
Description of problem:

In some environments VMs are pinned to specific hosts.
These VMs cannot be set as highly-available because this is incompatible with pinning.
The problem is: when the host crashes or is fenced one way or the other, these VMs do not start when the host is ready.

Version-Release number of selected component (if applicable):
This is seen on RHEV 3.5. 


How reproducible:
Always


Steps to Reproduce:
0. Configure Power Management on the host
1. Pin a VM to a host ("start on specific host")
2. Reboot or fence the host externally

Actual results:
The host comes up again "green" in RHEV / oVirt


Expected results:
The host comes up and the VM comes up too.

Comment 5 François Cami 2017-02-17 13:08:27 UTC
The VM must be down when the host is not available - and never restarted anywhere else than its dedicated host.

Comment 6 Martin Tessun 2017-02-17 14:21:00 UTC
Michal, what is your take on it. I believe this is sort of autostart feature for pinned VMs.

So the request is:

1. Select a host where the VM has to be started
2. Select "autostart option" (or however we implement it)
3. If the host is available, ensure the VM is started/running.
(4. If the host crashes etc. don't bother about this VM)

Thanks!
Martin

Comment 7 Yaniv Kaul 2017-02-17 15:07:55 UTC
Since you can select today a group of hosts for affinity, not sure this is still an issue.

Comment 8 Michal Skrivanek 2017-02-17 15:28:50 UTC
Martin, there's a difference between "HA" VMs and "autostart". HA restarts VMs only when host or VM crashes, autostart assumes it tries to start a VM whenever it is down even if it was e.g. shutdown from within the guest cleanly.
The original request seems to be about "HA", so as comment #7 says we may not really need anything anymore

Comment 9 Martin Tessun 2017-02-21 09:17:01 UTC
Hi Michal,

as I understood this, this is not about HA, but just about autostart.
So if the host affinity does work this way, I believe I am fine.

As I understood the requested workflow:

1. Pin a VM to a host (Start on host xy)
2. Enable "autostart"
3. VM is automatically started if host xy is available

In case the host crashes the VM is *not* restarted anywhere else
In case the host gets back into "up state" the VM is started automatically on this host.

@Francois: Please correct the workflow, if I misunderstood it.

Does strict host affinity solve this issue in this way?
If so, I believe we can close this with CURRENTRELEASE.

Thanks!
Martin

Comment 10 François Cami 2017-02-21 11:14:01 UTC
@Martin: the workflow as stated is exactly what is needed, thank you.

NB: I'm not clearing NEEDMOREINFO because I haven't played with host affinity in current oVirt/RHV versions.

Comment 11 Michal Skrivanek 2017-03-10 14:35:12 UTC
ok, sounds indeed resolved by affinity

Comment 12 François Cami 2017-03-10 14:47:41 UTC
@Michal @Martin thank you.

Comment 13 Yaniv Lavi 2018-05-24 17:00:11 UTC
What version is this in? Can you set the target milestone?

Comment 15 Michal Skrivanek 2018-05-24 19:15:30 UTC
affinity is a 3.6 feature I think, so it's everywhere

Comment 16 Yaniv Lavi 2018-06-11 06:53:01 UTC
(In reply to Michal Skrivanek from comment #15)
> affinity is a 3.6 feature I think, so it's everywhere

With auto-start?