Bug 1411739 - UI shows running vm on host though vm status on vdsm is down
Summary: UI shows running vm on host though vm status on vdsm is down
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ovirt-4.1.0-rc
: 4.1.0.2
Assignee: jniederm
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-10 12:09 UTC by Lilach Zitnitski
Modified: 2017-02-15 14:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-15 14:50:49 UTC
oVirt Team: Virt
rule-engine: ovirt-4.1+
gklein: blocker+
rule-engine: planning_ack+
tjelinek: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)
logs (454.07 KB, application/zip)
2017-01-10 12:09 UTC, Lilach Zitnitski
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 70048 0 master MERGED core: External VMs addition fix 2017-01-17 09:37:59 UTC
oVirt gerrit 70056 0 ovirt-engine-4.1 MERGED core: External VMs addition fix 2017-01-20 13:13:34 UTC

Description Lilach Zitnitski 2017-01-10 12:09:13 UTC
Description of problem:
When looking in the Hosts tab in the webadmin, the host has 1 vm currently running. 
When running vdsClient -s 0 list, it shows one vm but in down state:

[root@blond-vdsf ~]# vdsClient -s 0 list table
fa858d1a-13a7-46df-bd40-b4c8d6ddaec8  16288  vm_test              Down  

Because the engine thinks a vm is running on this host, the host can't be switched to maintenance (it gets stuck on 'Preparing for maintenance') 

Version-Release number of selected component (if applicable):
ovirt-engine-4.1.0-0.4.master.20170109222652.git53fd6cb.el7.centos.noarch
vdsm-4.19.1-18.git79e5ea5.el7.centos.x86_64

How reproducible:


Steps to Reproduce:
1. I'm not really sure how to reproduce it.. 


Additional info:
In the engine.log there are many logs about importing the stuck vm as external vm 

2017-01-10 13:50:19,461+02 INFO  [org.ovirt.engine.core.bll.AddUnmanagedVmsCommand] (DefaultQuartzScheduler5) [261374f5] Importing VM 'vm_test' as 'external-vm_test', as it is running on the on Host, but does not exist in the engine.

Comment 1 Lilach Zitnitski 2017-01-10 12:09:45 UTC
Created attachment 1239065 [details]
logs

engine and vdsm

Comment 2 Arik 2017-01-10 12:14:27 UTC
It is reproduced with any external VM.
The problem is that we fail to add the VM because of the configuration of max memory.
It happened on my environment as well:
2017-01-10 14:12:48,172+02 WARN  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (DefaultQuartzScheduler4) [2c72312a] Validation of action 'AddVmFromScratch' failed for user SYSTEM. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM,must be greater than or equal to 1,$groups [Ljava.lang.Class;@549320aa,$message {javax.validation.constraints.Min.message},$payload [Ljava.lang.Class;@36ff9b4c,$value 1,ACTION_TYPE_FAILED_ATTRIBUTE_PATH,$path vmStatic.maxMemorySizeMb

Comment 3 Red Hat Bugzilla Rules Engine 2017-01-11 10:02:11 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Anton Marchukov 2017-01-21 13:37:30 UTC
We put to ON_QA by mistake... should be in the next build.

Comment 5 Israel Pinto 2017-02-06 08:29:00 UTC
Verify with:
Red Hat Virtualization Manager Version: 4.1.0.3-0.1.el7

OS Version:RHEL - 7.3 - 7.el7
Kernel Version:3.10.0 - 550.el7.x86_64
KVM Version:2.6.0 - 28.el7_3.3.1
LIBVIRT Version:libvirt-2.0.0-10.el7_3.4
VDSM Version:vdsm-4.19.4-1.el7ev

Steps: 
Add host with running VM (from different environment) and check for NPE 

Results:
No NPE and host was add to set the external VMs can be stop from the Engine.


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