Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 893021

Summary: [rhevm] Host stuck in “Prepare to Maintenance” mode (when host is the last in data-center and has running vm)
Product: Red Hat Enterprise Virtualization Manager Reporter: vvyazmin <vvyazmin>
Component: ovirt-engineAssignee: Omer Frenkel <ofrenkel>
Status: CLOSED DUPLICATE QA Contact: Barak Dagan <bdagan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: aberezin, acathrow, bdagan, iheim, jkt, lpeer, michal.skrivanek, ofrenkel, oramraz, pstehlik, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-26 13:29:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
## Logs rhevm none

Description vvyazmin@redhat.com 2013-01-08 13:25:31 UTC
Created attachment 674820 [details]
## Logs rhevm

Description of problem:
Host stuck in “Prepare to Maintenance” mode

Version-Release number of selected component (if applicable):
RHEVM 3.2 - SF03 environment 

RHEVM: rhevm-3.2.0-4.el6ev.noarch
VDSM: vdsm-4.10.2-3.0.el6ev.x86_64
LIBVIRT: libvirt-0.10.2-13.el6.x86_64
QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.348.el6.x86_64
SANLOCK: sanlock-2.6-2.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create environment with two hosts (in my case it was in FC DC)
2. Create a one VM with 1GB preallocated disk & power-on a VM (VM run on Host-01)
3. Enter to maintenance first host (Host-01), than imitatively enter a second host to maintenance mode.
  
Actual results:
Second host enter to “Prepare to Maintenance” mode and stuck in this mode forever. No changes even after 2 hours. 
After I power-off VM, second host enter to Maintenance mode immediately. 

Expected results:
RHEVM should prevent enter to Maintenance mode if VM's is runing. 

Additional info:

/var/log/ovirt-engine/engine.log

/var/log/vdsm/vdsm.log

Comment 6 Barak Dagan 2013-01-14 16:44:35 UTC
*** Bug 889831 has been marked as a duplicate of this bug. ***

Comment 7 Omer Frenkel 2013-04-04 16:44:26 UTC
*** Bug 947806 has been marked as a duplicate of this bug. ***

Comment 10 Michal Skrivanek 2014-01-31 10:52:44 UTC
I think staying in preparing for maintenance after e.g. user manually cancels the migrations is fine. The event log should be clear and it's up to the user to resolve (shut down the offending VM, migrate manually again, cancel maintenance request by activating the host back)

Comment 11 Barak Dagan 2014-02-02 11:15:46 UTC
I disagree, As  can be seen from my sequence in https://bugzilla.redhat.com/show_bug.cgi?id=889831#7:


5) Vms migrated to dest host, but do not migrate back, since the migration action is triggered when host enters "preapare for maintenance" state - which happened before the vms transfered.
6) dst host state doesn't change, and vms keep running on dst host - until user trigger a new migration action.

There is a bug in that machine state, moving host to maintenace action - should be perform wothout user interference. 

Engine should know that the host is in migration action and reject / delay the maintenance one.

What do you think Arthur ?

Comment 14 Arthur Berezin 2014-02-26 13:29:27 UTC
BZ#966503 seems like a duplicate of this one, which would keep trying to migrate VMs from the machine until the host would change it's status to maintenance.

My only concern here is that the user doesn't get any notification or warning that would suggest the user should go to events log, for example in cases the migration keeps failing , this is a generic UX problem related issue, I'll open a separate bug.

*** This bug has been marked as a duplicate of bug 966503 ***