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 1429510 - Handle empty <script path=""/> coming from guests generated on older Libvirt versions
Summary: Handle empty <script path=""/> coming from guests generated on older Libvirt ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On: 1412834
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-06 14:03 UTC by Jaroslav Reznik
Modified: 2020-06-11 13:22 UTC (History)
11 users (show)

Fixed In Version: libvirt-2.0.0-10.el7_3.6
Doc Type: Bug Fix
Doc Text:
Cause: Due to a rewrite of some parts of libvirt that is responsible for generating the qemu command line, a bug was introduced. Previously, the script path was just passed to qemu command line which (if empty) just ignores it. After the rewrite it's libvirt who is executing the script and as such fails if the script path is empty. Consequence: Domains with interfaces with empty script path fail to start. Fix: A fix consists of accepting empty string as a valid script path but not executing it. Result: Migrations from 7.2 to 7.3 now succeed.
Clone Of: 1412834
Environment:
Last Closed: 2017-05-25 15:36:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1304 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-05-25 19:32:14 UTC

Description Jaroslav Reznik 2017-03-06 14:03:34 UTC
This bug has been copied from bug #1412834 and has been proposed
to be backported to 7.3 z-stream (EUS).

Comment 11 yalzhang@redhat.com 2017-04-01 08:44:26 UTC
Verify on libvirt-2.0.0-10.el7_3.6.x86_64, the result is as expected.
1. start a guest with empty <script path=""/>;
2. migrate vm libvirt-2.0.0-10.el7_3.6.x86_64 <-> libvirt-3.1.0-2.el7.x86_64
3. migrate vm libvirt-2.0.0-10.el7_3.6.x86_64 <-> libvirt-1.2.17-13.el7.x86_64(rhel7.2 release version)

---------------detail scenarios-------------------------
1. start a guest
1). create tap0 and connect to a bridge

# ip tuntap add dev tap0 mode tap; ifconfig tap0 up; brctl addif br0 tap0
# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.4437e66a7f29	no		eno1
							tap0

2) edit the xml to with "<script path=''/>", fail to validate the xml, only ignore can save this xml.

# virsh edit rhel7.3
...
   <interface type='ethernet'>
      <mac address='52:54:00:ac:64:90'/>
      <script path=''/>
      <target dev='tap0'/>
      <model type='virtio'/>
      <driver name='qemu'/>
    </interface>

error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content

Failed. Try again? [y,n,i,f,?]:  =====> press 'f'
error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content

Failed. Try again? [y,n,i,f,?]: ======> press 'i'

# virsh dumpxml rhel7.3 | grep /interface -B7
    <interface type='ethernet'>
      <mac address='52:54:00:ac:64:90'/>
      <script path=''/>
      <target dev='tap0'/>
      <model type='virtio'/>
      <driver name='qemu'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

3) start the vm and check the network function works well

# virsh start rhel7.3
Domain rhel7.3 started

guest 
# ip link show
.....
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 52:54:00:ac:64:90 brd ff:ff:ff:ff:ff:ff
# ping www.baidu.com  -c 3
PING www.a.shifen.com (119.75.213.50) 56(84) bytes of data.
64 bytes from 119.75.213.50 (119.75.213.50): icmp_seq=1 ttl=48 time=2.99 ms
64 bytes from 119.75.213.50 (119.75.213.50): icmp_seq=2 ttl=48 time=2.94 ms
64 bytes from 119.75.213.50 (119.75.213.50): icmp_seq=3 ttl=48 time=2.99 ms

--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 2.946/2.977/2.994/0.066 ms


2. migrate libvirt-2.0.0-10.el7_3.6.x86_64 <-> libvirt-3.1.0-2.el7.x86_64

1) prepare the env on both src and dst as scenario 1 step 1
src:
libvirt-2.0.0-10.el7_3.6.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.9.x86_64

dst:
libvirt-3.1.0-2.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

2) start a guest with os rhel7.3 with empty path on src host;

3) succeed to migrate src->dst, then migrate back dst->src;

3. migrate vm libvirt-1.2.17-13.el7.x86_64<->libvirt-2.0.0-10.el7_3.6.x86_64

1) set env
src(rhel7.2):
libvirt-1.2.17-13.el7.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.24.x86_64

dst(rhel7.3):
libvirt-2.0.0-10.el7_3.6.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.9.x86_64

2)start a rhel7.2 guest with empty path on 7.2 host
 
3)succeed to migrate src->dst

Comment 12 yalzhang@redhat.com 2017-04-01 10:44:55 UTC
scenario 3 
4)succeed to migrate back dst(rhel7.3)->src(rhel7.2) by
 # virsh migrate --live rhel7.2 qemu+ssh://10.66.70.x/system --verbose 
root.70.x's password: 
Migration: [100 %]

set this bug to be verified.

Comment 14 errata-xmlrpc 2017-05-25 15:36:26 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-2017:1304


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