avocado-framework / avocado-vt

Avocado VT Plugin
https://avocado-vt.readthedocs.org/
Other
83 stars 242 forks source link

login time expired error #1135

Open sghi opened 7 years ago

sghi commented 7 years ago

I use VT to test myself debian based .qcow2 file ,just obtained a login timeout expired error,but it work well when testing the default jeos image. it breaks in function wait_for_login, Besides . I notice that the VT use a ssh root@127.0.0.1 -p 5000 to connect to guest-os, I wonder if it is correct, or any settings need to be setted to make it go smootly? thank!

mangowda commented 6 years ago

I am seeing a similar issue. When I run bunch of avocado guest lifecycle tests (consists of 7 tests), 2-3 tests fail randomly with login timeout error. If I check screen dumps, I could see guest booted up but still avocado complains that it waited for login prompt. At the same time if I run those tests individually then I don't see this problem. Is this a known issue? I am using avocado version 53.

avocado run --vt-type qemu --vt-guest-os Linux.OL.7.4.x86_64.i440fx -- io-github-autotest-qemu.boot io-github-autotest-qemu.reboot io-github-autotest-qemu.shutdown io-github-autotest-qemu.save_restore.lifecycle_short io-github-autotest-qemu.stop_continue.stop_cont_only io-github-autotest-qemu.stop_continue.with_file_copy io-github-autotest-qemu.guest_test.isa_serial_operations

JOB ID : 1299f1b0073646e6406ff9d66a01946708a016a3 JOB LOG : /root/avocado/job-results/job-2017-10-05T02.33-1299f1b/job.log (1/7) io-github-autotest-qemu.boot: PASS (138.18 s) (2/7) io-github-autotest-qemu.reboot: ERROR (295.18 s) (3/7) io-github-autotest-qemu.shutdown: PASS (67.13 s) (4/7) io-github-autotest-qemu.save_restore.lifecycle_short: ERROR (667.74 s) (5/7) io-github-autotest-qemu.stop_continue.stop_cont_only: PASS (84.55 s) (6/7) io-github-autotest-qemu.stop_continue.with_file_copy: ERROR (421.86 s) (7/7) io-github-autotest-qemu.guest_test.isa_serial_operations: PASS (65.96 s) RESULTS : PASS 4 | ERROR 3 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 1818.97 s # Error message I see is: 2017-10-10 23:47:50,843 qemu_monitor L0321 DEBUG| (monitor avocado-vt-vm1.hmp1) Sending command 'cont' 2017-10-10 23:47:50,843 qemu_monitor L0751 DEBUG| Send command: cont 2017-10-10 23:47:50,863 virt_vm L0923 WARNI| Unable to read serial console 2017-10-10 23:47:50,863 virt_vm L0954 WARNI| Unable to read serial console 2017-10-10 23:47:50,864 virt_vm L1120 DEBUG| Attempting to log into 'avocado-vt-vm1' (timeout 360s) 2017-10-10 23:47:50,872 virt_vm L0842 DEBUG| Found/Verified IP 10.147.84.120 for VM avocado-vt-vm1 NIC 0 2017-10-10 23:54:13,861 client L1078 DEBUG| Sending command: ipconfig || ifconfig .... ..... 2017-10-11 00:00:41,525 qemu_vm L3112 DEBUG| Destroying VM avocado-vt-vm1 (PID 30681) 2017-10-11 00:00:41,526 qemu_vm L3014 DEBUG| Shutting down VM avocado-vt-vm1 (shell) 2017-10-11 00:01:02,176 qemu_vm L3029 DEBUG| Login timeout expired (output: '') 2017-10-11 00:01:02,176 qemu_vm L3122 DEBUG| VM avocado-vt-vm1 failed to go down (shell) 2017-10-11 00:01:02,177 qemu_vm L3126 DEBUG| Ending VM avocado-vt-vm1 process (monitor) 2017-10-11 00:01:02,184 client L0567 INFO | [qemu output] (Process terminated with status 0) ..... ..... 2017-10-11 00:01:18,280 test L0736 ERROR| LoginTimeoutError: Login timeout expired (output: '')

tsk-lieacui commented 6 years ago

I also encountered a similar problem:

01:40:46 DEBUG| 10 packets transmitted, 10 received, 0% packet loss, time 9212ms 01:40:46 DEBUG| rtt min/avg/max/mdev = 0.014/0.021/0.070/0.016 ms 01:40:46 DEBUG| (Process terminated with status 0) 01:40:46 INFO | Reboot vm after hotplug nic 01:40:46 DEBUG| Attempting to log into 'avocado-vt-vm1' via serial console (timeout 360s) 01:40:57 INFO | Context: rebooting 'avocado-vt-vm1' 01:40:57 DEBUG| Send command: shutdown -r now 01:40:57 INFO | Context: rebooting 'avocado-vt-vm1' --> waiting for guest to go down 01:40:57 DEBUG| Sending command: tty 01:41:07 INFO | Context: rebooting 'avocado-vt-vm1' --> logging in after reboot 01:41:07 DEBUG| Attempting to log into 'avocado-vt-vm1' via serial console (timeout 230s) 01:45:03 DEBUG| Attempting to log into 'avocado-vt-vm1' (timeout 240s) 01:45:03 DEBUG| Found/Verified IP 127.0.1.1 for VM avocado-vt-vm1 NIC 0 01:49:05 DEBUG| Sending command: ipconfig || ifconfig 01:49:06 DEBUG| Sending command: ip route || route print

I have checked the serial port print infomation in \root\avocado\job-results\latest\test-results...\serial-serial0-avocado-vt-vm1, I could see guest boot up and logined in, it's weird.