RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2019427 - "none" type audio device with child elements should not be removed for migratable XML
Summary: "none" type audio device with child elements should not be removed for migrat...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-02 14:24 UTC by Lili Zhu
Modified: 2022-05-17 13:05 UTC (History)
7 users (show)

Fixed In Version: libvirt-7.10.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 12:45:49 UTC
Type: Bug
Target Upstream Version: 7.10.0
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-101583 0 None None None 2021-11-03 01:42:40 UTC
Red Hat Product Errata RHBA-2022:2390 0 None None None 2022-05-17 12:46:14 UTC

Description Lili Zhu 2021-11-02 14:24:31 UTC
Description of problem:
"none" type audio device with child elements should not be removed for migratable XML

Version-Release number of selected component (if applicable):
libvirt-7.8.0-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. start a guest with the following xml snippet:
....
 <audio id='1' type='none' timerPeriod='40'>
      <input mixingEngine='yes' fixedSettings='yes' voices='1' bufferLength='100'>
        <settings frequency='44100' channels='2' format='s16'/>
      </input>
      <output mixingEngine='yes' fixedSettings='yes' voices='2' bufferLength='100'>
        <settings frequency='22050' channels='4' format='f32'/>
      </output>
    </audio>
....

2. check qemu cmd line 
# ps aux |grep audiodev
...
-audiodev id=audio1,driver=none,timer-period=40,in.mixing-engine=on,in.fixed-settings=on,in.voices=1,in.buffer-length=100,in.frequency=44100,in.channels=2,in.format=s16,out.mixing-engine=on,out.fixed-settings=on,out.voices=2,out.buffer-length=100,out.frequency=22050,out.channels=4,out.format=f32
...

3. check the migratable xml
# virsh dumpxml avocado-vt-vm1 --migratable |grep audio
(no outputs)

3. migrate guest to dst, then check guest xml
# virsh dumpxml avocado-vt-vm1 | grep audio
...
<audio id='1' type='none'/>
...


Expected results:
"none" type audio device with child elements should not be removed for migratable XML

Additional info:

Comment 1 Jaroslav Suchanek 2021-11-05 15:20:50 UTC
I assume this is expected behavior based on bug 1977891 -- libvirt can't be migrated back due to new audio element in domain definition.

Is that so Daniel?

Thanks.

Comment 2 Daniel Berrangé 2021-11-05 15:54:14 UTC
No, this is a genuine bug I asked QE to file.  We need to strip  <audio> elements in case of the default config, to support back migration, however, we are too aggressive in stripping. This causes us to strip user specified configs in some cases too.

Comment 3 Daniel Berrangé 2022-02-23 18:16:10 UTC
This was addressed upstream in

commit 9b43ec60af882724e15973206ee362cd38b02e38
Author: Daniel P. Berrangé <berrange>
Date:   Wed Nov 10 17:58:48 2021 +0000

    qemu: don't strip audio elements with user config present
    
    To support backwards live migration we must strip the default added
    audio element, however, we are too aggressive in doing so. We are only
    comparing a couple of attributes for equality, so risk stripping config
    that was user customized. To improve this we need to a deep comparison
    of the audio config.
    
    Reviewed-by: Michal Privoznik <mprivozn>
    Signed-off-by: Daniel P. Berrangé <berrange>


and as such is included in libvirt >= 7.10.0

Comment 6 Lili Zhu 2022-02-24 09:10:44 UTC
Tested with:
libvirt-8.0.0-4.el9.x86_64
qemu-kvm-6.2.0-9.el9.x86_64

1.prepare a guest with the following xml snippet
 <audio id='1' type='none' timerPeriod='40'>
      <input mixingEngine='yes' fixedSettings='yes' voices='1' bufferLength='100'>
        <settings frequency='44100' channels='2' format='s16'/>
      </input>
      <output mixingEngine='yes' fixedSettings='yes' voices='2' bufferLength='100'>
        <settings frequency='22050' channels='4' format='f32'/>
      </output>
    </audio>

2. start the guest
# virsh start avocado-vt-vm1 
Domain 'avocado-vt-vm1' started

3. migrate the guest to target host
# virsh migrate avocado-vt-vm1 qemu+ssh://$target_hostname/system --verbose --live 
Migration: [100 %]

4. check the guest xml on target host
# virsh dumpxml avocado-vt-vm1 |grep '<audio' -A8
    <audio id='1' type='none' timerPeriod='40'>
      <input mixingEngine='yes' fixedSettings='yes' voices='1' bufferLength='100'>
        <settings frequency='44100' channels='2' format='s16'/>
      </input>
      <output mixingEngine='yes' fixedSettings='yes' voices='2' bufferLength='100'>
        <settings frequency='22050' channels='4' format='f32'/>
      </output>
    </audio>
    <video>

child elements of audio device xml are not removed.

Comment 9 Lili Zhu 2022-02-25 05:48:53 UTC
Tested with:
libvirt-8.0.0-4.el9.x86_64
qemu-kvm-6.2.0-9.el9.x86_64

on source host:
# virsh dumpxml avocado-vt-vm1 --migratable  | grep '<audio' -A8
    <audio id='1' type='none' timerPeriod='40'>
      <input mixingEngine='yes' fixedSettings='yes' voices='1' bufferLength='100'>
        <settings frequency='44100' channels='2' format='s16'/>
      </input>
      <output mixingEngine='yes' fixedSettings='yes' voices='2' bufferLength='100'>
        <settings frequency='22050' channels='4' format='f32'/>
      </output>
    </audio>
    <video>

According to this above and Comment #6, mark the bug as verified.

Comment 11 errata-xmlrpc 2022-05-17 12:45:49 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 (new packages: libvirt), 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:2390


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