Bug 927591
Summary: | use set_link to change rtl8139 and e1000 network card's status but fail to make effectively after reboot guest | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Libor Miksik <lmiksik> |
Component: | qemu-kvm | Assignee: | jason wang <jasowang> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.5 | CC: | acathrow, agospoda, akong, areis, bsarathy, chayang, dnelson, dyasny, flang, jasowang, juzhang, mazhang, michen, minovotn, mkenneth, mst, pm-eus, qiguo, qzhang, rhod, sluo, stefanha, tlavigne, virt-maint |
Target Milestone: | rc | Keywords: | Regression, ZStream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-0.12.1.2-2.355.el6_4.5 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-06-03 17:31:34 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 907716 | ||
Bug Blocks: |
Description
Libor Miksik
2013-03-26 09:41:43 UTC
Fixed in version qemu-kvm-0.12.1.2-2.355.el6_4.5 verify this bug by kernel-2.6.32-358.11.1.el6.x86_64 and qemu-kvm-0.12.1.2-2.355.el6_4.5.x86_64 Components: host: # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.355.el6_4.5.x86_64 # uname -r 2.6.32-358.11.1.el6.x86_64 Guset: # uname -r 2.6.32-381.el6.x86_64 steps: 1.Boot Guest w/ e1000/RTL8139 virtual network device: 1.1 # /usr/libexec/qemu-kvm ... -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=rtl1,mac=54:52:1b:36:1a:01 ... 1.2 # /usr/libexec/qemu-kvm ... -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=rtl1,mac=54:52:1b:36:1a:01 ... 2.After boot up, inside guest, check the link status: # cat /sys/class/net/eth2/operstate up 3.Under hmp, turn down the network link, and check inside guest again. (qemu) set_link rtl1 off guest# cat /sys/class/net/eth2/operstate down 4.reboot guest. 4.1 under hmp, via system-reset (qemu) system_reset 4.2 reboot guest inside guest. Result: Test above steps w/ RTL8139/e1000/virtio-net-pci, after guest boot up again, guest is still unavailable, and check the status of guest: guest# cat /sys/class/net/eth2/operstate down So, according above, this bug is fixed by qemu-kvm-0.12.1.2-2.355.el6_4.5.x86_64 of RHEL6.4.z host kernel-2.6.32-358.11.1.el6.x86_64. Also test bug 908077 (load/unload+migration scenarios) with this build provided above. And verified pass. Steps: 1. Boot guest with e1000 NIC. /usr/libexec/qemu-kvm -cpu Penryn -m 2048 -smp 2,sockets=1,cores=2,threads=1 -M pc -enable-kvm -name rel6u4 -drive file=/mnt/rhel64cp3.qcow2,if=none,format=qcow2,werror=stop,rerror=stop,cache=none,id=drive-scsi0-disk0 -device virtio-scsi-pci,id=scsi0,addr=0x4 -device scsi-hd,scsi-id=0,lun=0,bus=scsi0.0,drive=drive-scsi0-disk0,id=virtio-disk0,bootindex=1 -nodefaults -nodefconfig -vnc :20 -monitor stdio -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=rtl1,mac=54:52:1b:36:1a:02 -vga std -boot menu=on 2. Boot guest on destination host with listening mode. 3. Inside guest: # while true; do rmmod e1000; modprobe e1000; sleep 2; done 4. Migrate guest to des host. 5. After migration, inside guest, kill the script in step 3. And check network: # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 54:52:1B:36:1A:02 inet addr:10.66.7.116 Bcast:10.66.7.255 Mask:255.255.252.0 inet6 addr: fe80::5652:1bff:fe36:1a02/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:491 errors:0 dropped:0 overruns:0 frame:0 TX packets:79 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:51578 (50.3 KiB) TX bytes:12054 (11.7 KiB) # ping 10.66.7.126 -c 10 PING 10.66.7.126 (10.66.7.126) 56(84) bytes of data. 64 bytes from 10.66.7.126: icmp_seq=1 ttl=64 time=0.824 ms 64 bytes from 10.66.7.126: icmp_seq=2 ttl=64 time=0.156 ms 64 bytes from 10.66.7.126: icmp_seq=3 ttl=64 time=0.134 ms 64 bytes from 10.66.7.126: icmp_seq=4 ttl=64 time=0.156 ms 64 bytes from 10.66.7.126: icmp_seq=5 ttl=64 time=0.132 ms 64 bytes from 10.66.7.126: icmp_seq=6 ttl=64 time=0.159 ms 64 bytes from 10.66.7.126: icmp_seq=7 ttl=64 time=0.136 ms 64 bytes from 10.66.7.126: icmp_seq=8 ttl=64 time=0.157 ms 64 bytes from 10.66.7.126: icmp_seq=9 ttl=64 time=0.134 ms 64 bytes from 10.66.7.126: icmp_seq=10 ttl=64 time=0.133 ms # service network restart Shutting down interface eth0: Device state: 3 (disconnected) [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Active connection state: activating Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/6 state: activated Connection activated [ OK ] 6.Test for 5 times, and this guest's link always works well after load/unload > migration. Test scenario: system-reset/reboot guest repeatedly with random timing 1. Boot guest with e1000 driver # /usr/libexec/qemu-kvm -cpu Penryn -m 2048 -smp 2,sockets=1,cores=2,threads=1 -M pc -enable-kvm -name rel6u4 -drive file=/home/rhel64cp3.qcow2,if=none,format=qcow2,werror=stop,rerror=stop,cache=none,id=drive-scsi0-disk0 -device virtio-scsi-pci,id=scsi0,addr=0x4 -device scsi-hd,scsi-id=0,lun=0,bus=scsi0.0,drive=drive-scsi0-disk0,id=virtio-disk0,bootindex=1 -nodefaults -nodefconfig -vnc :20 -monitor stdio -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=rtl1,mac=54:52:1b:36:1a:02 -vga std -boot menu=on -monitor unix:/tmp/qiguo1,server,nowait 2. Repeatedly resets by using system_rest guest with random timing by script #cat reboot.sh i=1 while [ $i -lt 900000 ] do echo "system_reset"|nc -U /tmp/qiguo1 i=$(($i+1)) number=$(($RANDOM%60+15)) echo $number sleep $number done Result: After one day's repeatedly reboot, guest's network works well: 1.send/receive pkg 2.ping out/in 3.reset network service So this scenario passed by qemu-kvm-0.12.1.2-2.355.el6_4.5.x86_64 in RHEL6.4.z host w/ kernel-2.6.32-358.11.1.el6.x86_64. Migrate guest between rhel6.3 and rhel6.4.z with load/unload nic driver. source: kernel:2.6.32-279.el6.x86_64 qemu-kvm-0.12.1.2-2.295.el6.x86_64 destination: kernel:2.6.32-358.11.1.el6.x86_64 qemu-img-rhev-0.12.1.2-2.355.el6_4.5.x86_64 guest: kernel:2.6.32-358.11.1.el6.x86_64 steps: 1 boot up guest on source host with: /usr/libexec/qemu-kvm \ -name rhel6u4 \ -M rhel6.3.0 \ -enable-kvm \ -m 4096 \ -smp 2,sockets=2,cores=1,threads=1 \ -uuid 4ee77792-380d-e8e6-0d77-eb91fdf84a17 \ -nodefconfig \ -monitor stdio \ -rtc base=localtime,clock=host,driftfix=slew \ -boot menu=on \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -drive file=/mnt/rhel6u4.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none \ -device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -drive file=/mnt/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=2 \ -netdev tap,id=hostnet1 \ -device rtl8139,netdev=hostnet1,id=net1,mac=52:54:00:01:01:ef,bus=pci.0,addr=0x7 \ -chardev pty,id=charserial0 \ -device isa-serial,chardev=charserial0,id=serial0 \ -device usb-tablet,id=input0 \ -vnc :0 \ -vga cirrus \ -device intel-hda,id=sound0,bus=pci.0 \ -device hda-duplex \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x9 \ -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait \ -device virtserialport,chardev=channel1,name=port1,bus=virtio-serial0.0,id=port1 \ 2. Boot guest on destination host with listening mode. 3. Inside guest: # while true; do rmmod e1000; modprobe e1000; sleep 2; done 4. Migrate guest to des host. 5. After migration, inside guest, kill the script in step 3. And check network: [root@localhost network-scripts]# ifdown eth2 [root@localhost network-scripts]# ifup eth2 Determining IP information for eth2... done. 6. do ping-pong migration with load/unload nic driver 5 times. 7. repeat step1~6 with rtl8139 result: guest nic work well , can get ip address. 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. http://rhn.redhat.com/errata/RHSA-2013-0896.html |