Bug 2060316

Summary: Rebase libvirt-python for RHEL 9.1
Product: Red Hat Enterprise Linux 9 Reporter: Jiri Denemark <jdenemar>
Component: libvirt-pythonAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: lcheng
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: dzheng, jdenemar, lcheng, lmen, virt-bugs, virt-maint, weizhan, xuzhang, yalzhang
Target Milestone: rcKeywords: Rebase, Triaged
Target Release: 9.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-python-8.5.0-1.el9 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: 2060313 Environment:
Last Closed: 2022-11-15 10:09:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: 8.5.0
Embargoed:
Bug Depends On: 2060313    
Bug Blocks:    

Description Jiri Denemark 2022-03-03 09:54:37 UTC
+++ This bug was initially created as a clone of Bug #2060313 +++

Description of problem:

Rebase libvirt-python in RHEL-9.1

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

libvirtpython-8.0.0

Steps to Reproduce:
1. rpm -qa libvirt-python

Expected results:

libvirt-python-8.6.0

Comment 3 lcheng 2022-07-22 08:25:48 UTC
Test with python3-libvirt-8.5.0-1.el9.x86_64, libvirt-8.5.0-2.el9.x86_64 and qemu-kvm-7.0.0-9.el9.x86_64.


Scenario 1(negative): parallel + zerocopy + native_tls + p2p

# python
Python 3.9.13 (main, Jun  9 2022, 00:00:00) 
[GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> src_conn = libvirt.open()
>>> desturi = "qemu+tcp://dell-per740-43.lab.eng.pek2.redhat.com/system"
>>> srcconn = libvirt.open()
>>> destconn = libvirt.open("qemu+tcp://dell-per740-43.lab.eng.pek2.redhat.com/system")
>>> dom = srcconn.lookupByName("avocado-vt-vm1")
>>> flags = libvirt.VIR_MIGRATE_LIVE|libvirt.VIR_MIGRATE_AUTO_CONVERGE|libvirt.VIR_MIGRATE_POSTCOPY|libvirt.VIR_MIGRATE_ZEROCOPY|libvirt.VIR_MIGRATE_TLS|libvirt.VIR_MIGRATE_PARALLEL|libvirt.VIR_MIGRATE_PEER2PEER
>>> dom.migrateToURI3(desturi, {'bandwidth': 100}, flags)
libvirt: QEMU Driver error : operation failed: job 'migration out' failed: Requested Zero Copy feature is not available: Invalid argument
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 2157, in migrateToURI3
    raise libvirtError('virDomainMigrateToURI3() failed')
libvirt.libvirtError: operation failed: job 'migration out' failed: Requested Zero Copy feature is not available: Invalid argument
>>> 


Scenario 2(negative): parallel + zerocopy + native_tls + non-p2p

>>> flags = libvirt.VIR_MIGRATE_LIVE|libvirt.VIR_MIGRATE_AUTO_CONVERGE|libvirt.VIR_MIGRATE_POSTCOPY|libvirt.VIR_MIGRATE_ZEROCOPY|libvirt.VIR_MIGRATE_TLS|libvirt.VIR_MIGRATE_PARALLEL
>>> dom.migrate3(destconn, {'bandwidth': 100}, flags)
libvirt: QEMU Driver error : operation failed: job 'migration out' failed: Requested Zero Copy feature is not available: Invalid argument
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 1969, in migrate3
    raise libvirtError('virDomainMigrate3() failed')
libvirt.libvirtError: operation failed: job 'migration out' failed: Requested Zero Copy feature is not available: Invalid argument
>>> 
>>> 


Scenario 3(negative): non_parallel + zerocopy + p2p

>>> flags = libvirt.VIR_MIGRATE_LIVE|libvirt.VIR_MIGRATE_AUTO_CONVERGE|libvirt.VIR_MIGRATE_POSTCOPY|libvirt.VIR_MIGRATE_ZEROCOPY|libvirt.VIR_MIGRATE_PEER2PEER
>>> dom.migrateToURI3(desturi, {'bandwidth': 100}, flags)
libvirt: QEMU Driver error : Requested operation is not valid: zero-copy is only available for parallel migration
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 2157, in migrateToURI3
    raise libvirtError('virDomainMigrateToURI3() failed')
libvirt.libvirtError: Requested operation is not valid: zero-copy is only available for parallel migration


Scenario 4(negative): non_parallel + zerocopy + non_p2p

>>> flags = libvirt.VIR_MIGRATE_LIVE|libvirt.VIR_MIGRATE_AUTO_CONVERGE|libvirt.VIR_MIGRATE_POSTCOPY|libvirt.VIR_MIGRATE_ZEROCOPY
>>> dom.migrate3(destconn, {'bandwidth': 100}, flags)
libvirt: QEMU Driver error : Requested operation is not valid: zero-copy is only available for parallel migration
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 1969, in migrate3
    raise libvirtError('virDomainMigrate3() failed')
libvirt.libvirtError: Requested operation is not valid: zero-copy is only available for parallel migration


Scenario 5: parallel + zerocopy + non_p2p

>>> flags = libvirt.VIR_MIGRATE_LIVE|libvirt.VIR_MIGRATE_AUTO_CONVERGE|libvirt.VIR_MIGRATE_POSTCOPY|libvirt.VIR_MIGRATE_PARALLEL|libvirt.VIR_MIGRATE_ZEROCOPY
>>> dom.migrate3(destconn, {'bandwidth': 10}, flags)
<libvirt.virDomain object at 0x7f81309e0370>


Scenario 6: parallel + zerocopy + p2p

>>> srcconn = libvirt.open()
>>> desturi = "qemu+tcp://dell-per740-43.lab.eng.pek2.redhat.com/system"
>>> destconn = libvirt.open("qemu+tcp://dell-per740-43.lab.eng.pek2.redhat.com/system")
>>> dom = srcconn.lookupByName("avocado-vt-vm1")
>>> flags = libvirt.VIR_MIGRATE_LIVE|libvirt.VIR_MIGRATE_PEER2PEER|libvirt.VIR_MIGRATE_AUTO_CONVERGE|libvirt.VIR_MIGRATE_POSTCOPY|libvirt.VIR_MIGRATE_PARALLEL|libvirt.VIR_MIGRATE_ZEROCOPY
>>> dom.migrateToURI3(desturi, {'bandwidth': 10}, flags)
0
>>>  


Scenario 7: parallel + zerocopy, abort migration, then migrate again.

terminal 1:

>>> srcconn = libvirt.open()
>>> desturi = "qemu+tcp://dell-per740-43.lab.eng.pek2.redhat.com/system"
>>> destconn = libvirt.open("qemu+tcp://dell-per740-43.lab.eng.pek2.redhat.com/system")
>>> dom = srcconn.lookupByName("avocado-vt-vm1")
>>> flags = libvirt.VIR_MIGRATE_LIVE|libvirt.VIR_MIGRATE_AUTO_CONVERGE|libvirt.VIR_MIGRATE_POSTCOPY|libvirt.VIR_MIGRATE_ZEROCOPY|libvirt.VIR_MIGRATE_PARALLEL
>>> dom.migrate3(destconn, {'bandwidth': 100}, flags)
libvirt: QEMU Driver error : operation aborted: job 'migration out' canceled by client
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 1969, in migrate3
    raise libvirtError('virDomainMigrate3() failed')
libvirt.libvirtError: operation aborted: job 'migration out' canceled by client


>>> dom.migrate3(destconn, {'bandwidth': 100}, flags)
<libvirt.virDomain object at 0x7f8132896970>
>>> 


terminal 2:

# virsh domjobabort avocado-vt-vm1

Comment 4 lcheng 2022-07-22 08:50:00 UTC
Sorry, please ignore comment 3.

Comment 6 lcheng 2022-08-16 10:13:51 UTC
According to Comment 5, moved to VERIFIED.

Comment 8 errata-xmlrpc 2022-11-15 10:09:35 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 (libvirt-python bug fix and enhancement update), 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-2022:8007