Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

kvm: Adds nic_hotplug timeout #52

Closed
wants to merge 1 commit into from

3 participants

@jzupka

Is this bug of test or system?

Add timeout for nic interface initialization.
The ping command fails often without timeout.

Signed-off-by: Jiří Župka jzupka@redhat.com

@jzupka jzupka kvm: Adds nic_hotplug timeout
Add timeout for nic interface initialization.
The ping command fails often without timeout.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
9ba9444
@zhouqt
Owner

I guess guest may need some time to initiate new nic's ip address. Since I met some ping failure when doing:
1) ping some box.
2) set up/down the nic card on that box with ifconfig cmd.
Though I can get the correct arp entry on that box, ping cmd still failed.

@lmr
Owner

I was looking at this, we do wait until the new nic got an IP address, so this timeout shouldn't be necessary. Moreover, I did try the tests here on my laptop, they seem to PASS without the timeout. I'm inclined to think this patch is unnecessary, but I'll leave this pull request open until I hear you guys opinion, @jzupka and @zhouqt.

@lmr
Owner

Interesting, after I applied the openvswitch patchset, I started getting some failures at the nic_hotplug tests (not all tests fail due to @jzupka's fixes, but some of them... hmm...

@lmr
Owner

Seems a false alarm, I ran 3 sets in sequence and got a single failure:

[root@freedom virt-test.git]# ./run -t kvm
DEBUG LOG: /home/lmr/Code/virt-test.git/logs/run-2012-10-10-13.56.25/debug.log
TESTS: 6
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_8139: PASS (51.33 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_virtio: PASS (16.73 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_e1000: PASS (16.78 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_8139: PASS (21.52 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_virtio: FAIL (15.31 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_e1000: PASS (77.66 s)
[root@freedom virt-test.git]# ./run -t kvm
DEBUG LOG: /home/lmr/Code/virt-test.git/logs/run-2012-10-10-14.00.01/debug.log
TESTS: 6
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_8139: PASS (17.53 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_virtio: PASS (16.77 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_e1000: PASS (16.83 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_8139: PASS (19.27 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_virtio: PASS (122.56 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_e1000: PASS (21.58 s)
[root@freedom virt-test.git]# ./run -t kvm
DEBUG LOG: /home/lmr/Code/virt-test.git/logs/run-2012-10-10-14.03.45/debug.log
TESTS: 6
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_8139: PASS (16.97 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_virtio: PASS (17.22 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.default.nic_e1000: PASS (16.82 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_8139: PASS (20.18 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_virtio: PASS (19.42 s)
kvm.virtio_blk.smp2.virtio_net.Fedora.17.64.nic_hotplug.additional.nic_e1000: PASS (21.73 s)
@lmr
Owner

Closing pull request, for the reasons outlined above.

@lmr lmr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 9, 2012
  1. @jzupka

    kvm: Adds nic_hotplug timeout

    jzupka authored
    Add timeout for nic interface initialization.
    The ping command fails often without timeout.
    
    Signed-off-by: Jiří Župka <jzupka@redhat.com>
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  kvm/tests/nic_hotplug.py
View
3  kvm/tests/nic_hotplug.py
@@ -1,4 +1,4 @@
-import logging
+import logging, time
from autotest.client.shared import error
from virttest import utils_test, virt_vm, aexpect
@@ -80,6 +80,7 @@ def guest_path_isfile(path):
raise error.TestFail("Could not get or verify ip address of nic")
logging.info("Got the ip address of new nic: %s", ip)
+ time.sleep(3)
logging.info("Ping test the new nic ...")
s, o = utils_test.ping(ip, 100)
if s != 0:
Something went wrong with that request. Please try again.