Bug 1394570 - [HE] Engine VM automatically migrates to host on local maintenance mode
Summary: [HE] Engine VM automatically migrates to host on local maintenance mode
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-ha
Classification: oVirt
Component: Agent
Version: 2.0.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.1.1
: 2.1.0.4
Assignee: Denis Chaplygin
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-13 17:48 UTC by Gonza
Modified: 2017-04-21 09:50 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:50:06 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: ovirt-4.1+
ylavi: planning_ack+
dfediuck: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1398822 0 high CLOSED HE VM shutdown abruptly when master storage domain is put into maintenance mode (VDSM side) 2021-02-22 00:41:40 UTC
oVirt gerrit 67256 0 master MERGED he: Prevent VM from migrating when there is no host for it 2016-12-01 17:15:48 UTC
oVirt gerrit 67273 0 master MERGED he: Prevent last HE host from going to the local maintenance mode. 2016-12-22 13:39:05 UTC
oVirt gerrit 67300 0 master ABANDONED engine: Do not switch last HE node to maintenance mode 2016-12-06 14:58:43 UTC
oVirt gerrit 67888 0 master MERGED engine: Do not switch last HE node to maintenance mode 2016-12-09 14:32:42 UTC
oVirt gerrit 68436 0 v2.0.z MERGED he: Prevent VM from migrating when there is no host for it 2016-12-15 10:52:09 UTC
oVirt gerrit 68444 0 ovirt-engine-4.0 MERGED engine: Do not switch last HE node to maintenance mode 2016-12-21 11:22:58 UTC
oVirt gerrit 68995 0 ovirt-hosted-engine-setup-2.1 MERGED he: Prevent last HE host from going to the local maintenance mode. 2017-01-13 13:18:37 UTC

Internal Links: 1398822

Description Gonza 2016-11-13 17:48:02 UTC
Description of problem:
On an HE with 2 hosted engine agent hosts, when host that is holding the engine VM is set to local maintenance, the engine vm is migrated to the next hosted engine agent even if this agent is set to local maintenance too.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-ha-2.0.4-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Have a HE with 2 hosted engine agent hosts
2. have an agent in local maintenance mode
3. engine vm should be on the next agent, set this to local maintenance and see vm migrates to other agent

Actual results:
engine vm is migrated to host in local maintenance

Expected results:
engine vm should not migrate

Comment 1 Martin Sivák 2016-11-23 13:30:33 UTC
I believe the expected behavior here should be that the host is not moved to local maintenance if it is the last host available (last active host with score higher than 0). This will also prevent the migration.

I expect this to happen in two source code places - 1) the agent's state machine and the 2) data collecting code that computes the best alternative host.

Comment 2 Sandro Bonazzola 2016-12-11 06:11:59 UTC
Moving back to post, a referenced patch is still under review.
Denis, are you working on this BZ? please set yourself as assignee.

Comment 3 Sandro Bonazzola 2017-01-25 07:56:14 UTC
4.0.6 has been the last oVirt 4.0 release, please re-target this bug.

Comment 4 Sandro Bonazzola 2017-02-01 16:02:52 UTC
oVirt 4.1.0 GA has been released, re-targeting to 4.1.1.
Please check if this issue is correctly targeted or already included in 4.1.0.

Comment 5 Denis Chaplygin 2017-03-02 06:02:34 UTC
As far as i understand, patches are already merged to required branches.

Comment 6 Nikolai Sednev 2017-03-05 20:19:34 UTC
puma18 is not running HE-VM.
puma18 ~]# hosted-engine --set-maintenance --mode=local
Score                              : 0
Local maintenance                  : True

puma19 is running HE-VM.
puma19 ~]# hosted-engine --set-maintenance --mode=local
Unable to enter local maintenance mode: there are no available hosts capable of running the engine VM.

Components on hosts:
libvirt-client-2.0.0-10.el7_3.4.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.6.x86_64
rhevm-appliance-20160721.0-2.el7ev.noarch
mom-0.5.9-1.el7ev.noarch
ovirt-hosted-engine-setup-2.1.0.3-1.el7ev.noarch
ovirt-engine-sdk-python-3.6.9.1-1.el7ev.noarch
sanlock-3.4.0-1.el7.x86_64
ovirt-vmconsole-host-1.0.4-1.el7ev.noarch
vdsm-4.19.6-1.el7ev.x86_64
ovirt-host-deploy-1.6.0-1.el7ev.noarch
ovirt-vmconsole-1.0.4-1.el7ev.noarch
ovirt-imageio-common-1.0.0-0.el7ev.noarch
ovirt-imageio-daemon-1.0.0-0.el7ev.noarch
ovirt-setup-lib-1.1.0-1.el7ev.noarch
ovirt-hosted-engine-ha-2.1.0.3-1.el7ev.noarch
Linux version 3.10.0-514.6.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Sat Dec 10 11:15:38 EST 2016
Linux 3.10.0-514.6.1.el7.x86_64 #1 SMP Sat Dec 10 11:15:38 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.3 (Maipo)

On engine:
rhev-guest-tools-iso-4.1-3.el7ev.noarch
rhevm-dependencies-4.1.0-1.el7ev.noarch
rhevm-doc-4.1.0-2.el7ev.noarch
rhevm-branding-rhev-4.1.0-1.el7ev.noarch
rhevm-setup-plugins-4.1.0-1.el7ev.noarch
rhevm-4.1.1.2-0.1.el7.noarch
Linux version 3.10.0-514.6.2.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Fri Feb 17 19:21:31 EST 2017
Linux 3.10.0-514.6.2.el7.x86_64 #1 SMP Fri Feb 17 19:21:31 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.3 (Maipo)

Moving to verified.


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