Bug 1777094 - Migration can't be started because of NULL virTypedParamsFilter parameter
Summary: Migration can't be started because of NULL virTypedParamsFilter parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Jiri Denemark
QA Contact: yafu
URL:
Whiteboard:
Depends On:
Blocks: 1677408
TreeView+ depends on / blocked
 
Reported: 2019-11-26 22:21 UTC by Guowen Shan
Modified: 2020-05-05 09:51 UTC (History)
10 users (show)

Fixed In Version: libvirt-5.10.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:51:23 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
Detailed steps to carry out the migration (2.64 KB, text/plain)
2019-11-27 03:00 UTC, Guowen Shan
no flags Details
libvirt log (199.00 KB, text/plain)
2019-11-27 05:53 UTC, Guowen Shan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:51:57 UTC

Description Guowen Shan 2019-11-26 22:21:25 UTC
Description of problem:

Installed RHEL8.2 and last AV packages, the migration can't be done because of below error:

[root@amd-seattle-07 ~]# virsh migrate --live rhel8 qemu+ssh://10.16.200.171/system
error: params in virTypedParamsFilter must not be NULL

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Provision two machines (AMD Seattles) with RHEL-8.2.0-20191119.n.0
2. Install the last AV packages from below link
   baseurl=http://download.devel.redhat.com/rhel-8/nightly/ADVANCED-VIRT-8/latest-ADVANCED-VIRT-8.2.0-RHEL-8/compose/Advanced-virt/aarch64/os/

   host# yum module disable virt:rhel
   host# yum module enable virt:8.2
   host# yum install -y qemu-kvm libvirt virt-install
   host# service libvirtd restart
3. Configured the virtual network bridge
   nmcli con down <wired-con-name>   # determine name with 'nmcli con show'
   nmcli con modify <wired-con-name> autoconnect no
   nmcli con add type bridge ifname br0 stp no
   nmcli con add type bridge-slave ifname <wired-if-name> master br0 # determine name with 'ip addr show'
       nmcli con up bridge-br0
4. Install guests
   # virt-install -n rhel8 --vcpus 8 --memory 4096 --disk size=6 --network bridge=br0 \
     --boot loader=/usr/share/AAVMF/AAVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/usr/share/AAVMF/AAVMF_VARS.fd,loader_secure=no \
      -l http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8/compose/BaseOS/aarch64/os/
5. Setup NFS server so that two guests can share same disk image;
   Disable disk's cache through "virsh edit <machine_name>";
   Tell SELinux it's ok for virt use;
6 Start one guest and migrate it to target.
   # virsh migrate --live rhel8 qemu+ssh://10.16.200.171/system
   error: params in virTypedParamsFilter must not be NULL

Actual results:

The migration can't be started.

Expected results:

The migration can be started without error.

The migration should be 

Additional info:

Comment 1 Guowen Shan 2019-11-27 02:59:48 UTC
Rerun the test case with last scratch builds, the issue is still existing.

Host BaseOS: RHEL-8.2.0-20191126.n.0
qemu-kvm:    http://brew-task-repos.usersys.redhat.com/repos/scratch/drjones/qemu-kvm/4.2.0/0.el8.drjones201911191900/
libvirt:     http://brew-task-repos.usersys.redhat.com/repos/scratch/jdenemar/libvirt/5.9.0/4.virtio_fs.b68426e149.module+el8.2.0+4836+a8e32ad7

[root@amd-seattle-07]# virsh migrate --live rhel8 qemu+ssh://10.16.200.17/system
root@10.16.200.171's password: 
error: params in virTypedParamsFilter must not be NULL

Note: The detailed steps to run the test case can be found from the attached ("f000-migration-test.txt")

Comment 2 Guowen Shan 2019-11-27 03:00:38 UTC
Created attachment 1640010 [details]
Detailed steps to carry out the migration

Comment 3 Guowen Shan 2019-11-27 05:53:12 UTC
Created attachment 1640015 [details]
libvirt log

debugging logs from libvirt, which was collected after running below commands:

   # virt-admin daemon-log-filters "1:util 1:libvirt 1:storage 1:network 1:nodedev 1:qemu"
   # virt-admin daemon-log-outputs "1:file:/var/log/libvirt.log"

Comment 4 Jiri Denemark 2019-11-28 10:25:03 UTC
Patch sent upstream for review:

https://www.redhat.com/archives/libvir-list/2019-November/msg01414.html

Comment 5 Jiri Denemark 2019-11-28 13:29:39 UTC
Fixed upstream by

commit d802d9ab83ad0d852310c79998ee11c0a440b615
Refs: v5.10.0-rc1-16-gd802d9ab83
Author:     Jiri Denemark <jdenemar@redhat.com>
AuthorDate: Wed Nov 27 17:21:58 2019 +0100
Commit:     Jiri Denemark <jdenemar@redhat.com>
CommitDate: Thu Nov 28 14:27:11 2019 +0100

    qemu: Fix migration without parameters

    The virTypedParamsFilter function doesn't mind params == NULL if nparams
    is zero. And there's no need to check for params == NULL && nparams > 0
    because this is checked higher in the stack.

    In fact all the virCheckNonNull* checks in virTypedParamsFilter are
    useless.

    https://bugzilla.redhat.com/show_bug.cgi?id=1777094

    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
    Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Reviewed-by: Erik Skultety <eskultet@redhat.com>

Comment 6 Guowen Shan 2019-11-28 22:21:06 UTC
Jiri, please let me know when the patch is ported to RHEL8.2 stream, or you have
a private libvirt build to include the fix. I can try it out for verification
purpose.

Comment 9 yafu 2020-02-03 13:53:04 UTC
Verified with libvirt-6.0.0-2.el8.x86_64

Test steps:
1.# virsh migrate vm2 qemu+ssh://10.66.36.15/system  --live 

2.#virsh migrate vm2 qemu+ssh://10.66.36.15/system  --live --verbose
Migration: [100 %]

3.# virsh migrate vm2 qemu+ssh://10.66.36.15/system  --postcopy --p2p --live --verbose
Migration: [100 %]

4.# virsh migrate vm2 qemu+ssh://10.66.36.15/system   --p2p --live 

5.# virsh migrate vm2 qemu+ssh://10.66.36.15/system  --postcopy --p2p  --live --postcopy-after-precopy

6.# virsh migrate yafu qemu+ssh://10.66.36.15/system

Comment 11 errata-xmlrpc 2020-05-05 09:51:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2017


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