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
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: x86_64
OS: Unspecified
Target Milestone: ovirt-4.1.0-rc
Assignee: jniederm
QA Contact: Israel Pinto
Depends On:
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:
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

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):

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]

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:

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

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

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.