Bug 1655985

Summary: Migration failed with libvirtError when certain migration policy and VM memory are set
Product: Red Hat Enterprise Virtualization Manager Reporter: Pedut <pchocron>
Component: libvirtAssignee: Ryan Barry <rbarry>
Status: CLOSED WORKSFORME QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: lrotenbe, ratamir, rbarry
Target Milestone: ovirt-4.3.3Keywords: Automation
Target Release: 4.3.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-28 15:37:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs
none
additional logs none

Description Pedut 2018-12-04 11:30:33 UTC
Created attachment 1511269 [details]
logs

Description of problem:
Migration failed with libvirtError when certain migration policy and VM memory are set.

Version-Release number of selected component (if applicable):
Engine Version: 4.3.0-0.5.alpha1.el7
OS Version: RHEL - 7.6 - 4.el7
LIBVIRT Version: libvirt-4.5.0-10.el7_6.3
VDSM Version: vdsm-4.30.3-1.el7ev

How reproducible:
100%

Steps to Reproduce:
1. Set migration policy in cluster to minimal downtime and migration bandwidth to custom with 52 Mbps.
2. Find the host with the minimum free memory size in the environment
3. Create VM with memory size equals to 30% of the free memory of the host that you found at step 2.
4. Set the VM maximum memory to be equal to the VM memory size + 2GB.
4. Run VM.
5. Migrate VM. 

Actual results:
Migration completed fine.

Expected results:
Migration stuck and eventually failed with libvirtError.

Additional info:
2018-11-26 03:22:01,552+0200 ERROR (migsrc/1d1a5210) [virt.vm] (vmId='1d1a5210-2abe-43ad-bf47-5aef1565168e') Failed to migrate (migration:450)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/virt/migration.py", line 431, in _regular_run
    time.time(), migrationParams, machineParams
  File "/usr/lib/python2.7/site-packages/vdsm/virt/migration.py", line 505, in _startUnderlyingMigration
    self._perform_with_conv_schedule(duri, muri)
  File "/usr/lib/python2.7/site-packages/vdsm/virt/migration.py", line 591, in _perform_with_conv_schedule
    self._perform_migration(duri, muri)
  File "/usr/lib/python2.7/site-packages/vdsm/virt/migration.py", line 525, in _perform_migration
    self._migration_flags)
  File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", line 100, in f
    ret = attr(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 131, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 94, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1779, in migrateToURI3
    if ret == -1: raise libvirtError ('virDomainMigrateToURI3() failed', dom=self)
libvirtError: operation aborted: migration out job: canceled by client

Comment 2 Ryan Barry 2018-12-05 11:15:45 UTC
Please attach the libvirt and qemu logs from lynx03

Comment 3 Pedut 2018-12-06 12:22:49 UTC
Created attachment 1512096 [details]
additional logs

libvirt and qemu logs

Comment 4 Ryan Barry 2019-01-21 14:53:40 UTC
Re-targeting to 4.3.1 since it is missing a patch, an acked blocker flag, or both