Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1412198 - Exception thrown when external VM started
Summary: Exception thrown when external VM started
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: 4.20.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.1.1
: ---
Assignee: Milan Zamazal
QA Contact: Israel Pinto
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-11 14:09 UTC by jniederm
Modified: 2017-04-21 09:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-04-21 09:47:31 UTC
oVirt Team: Virt
rule-engine: ovirt-4.1+

Attachments (Terms of Use)
vm-descriptor.xml (4.29 KB, text/plain)
2017-01-11 14:09 UTC, jniederm
no flags Details
vdsm.log (4.03 MB, text/plain)
2017-01-11 14:13 UTC, jniederm
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 70134 0 master MERGED virt: Don't crash on external VMs in sampling 2017-01-15 21:56:08 UTC
oVirt gerrit 70486 0 ovirt-4.1 MERGED virt: Don't crash on external VMs in sampling 2017-01-17 07:48:52 UTC

Description jniederm 2017-01-11 14:09:50 UTC
Created attachment 1239454 [details]

Description of problem:
When new VM is started directly on host using `virsh`, the VM is not reported to engine. Instead an exception is logged to vdsm.log

Version-Release number of selected component (if applicable):
Version     : 4.20.0
Release     : 107.gitdc67b50.fc24
Host OS: Fedora 24

How reproducible:

Steps to Reproduce:
1. Let's have a host without any running VMs connected to the engine
2. Run a VM from virsh (`virsh create <some vm descriptor>`, used descriptor attached)
3. Check vdsm.log and engine

Actual results:
there are no VMs reported to be running on the host
vdsm.log contains exception like:
2017-01-11 14:57:22,028 ERROR (periodic/1) [virt.periodic.Operation] <vdsm.virt.sampling.VMBulkSampler object at 0x7f49b37d7850> operation failed (periodic:192)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/virt/periodic.py", line 190, in __call__
  File "/usr/lib/python2.7/site-packages/vdsm/virt/sampling.py", line 510, in __call__
  File "/usr/lib/python2.7/site-packages/vdsm/virt/sampling.py", line 519, in _send_metrics
    vm_obj = vms[vm_id]
KeyError: '567e8327-31d8-482e-aeb5-e0c9124e91b4'

Expected results:
external VM is reported to the engine

Additional info:

Comment 1 jniederm 2017-01-11 14:13:05 UTC
Created attachment 1239456 [details]

Comment 2 Israel Pinto 2017-03-01 08:56:52 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.5
VDSM Version:vdsm-4.19.6-1.el7ev
SPICE Version:0.12.4 - 20.el7_3

Create vm with virsh and run it on host.
VM is up and running on host, no errors found on host logs.
The is not display in VM tab on UI.

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