Webdriver powerOff fail : stderr: VBoxManage: error: Invalid machine state: PoweredOff |
||
Issue description
In another test run the test failed to continue because the webdriver could not be powered off after successfully running a spec for a batch of Aps.
Traceback (most recent call last):
File "/usr/local/autotest/server/server_job.py", line 690, in run
self._execute_code(server_control_file, namespace)
File "/usr/local/autotest/server/server_job.py", line 1187, in _execute_code
execfile(code_file, namespace, namespace)
File "/usr/local/autotest/results/69041135-chromeos-test/chromeos3-row1-rack2-host4/control.srv", line 39, in <module>
parallel_simple(run_chaos_wpa2psk, machines)
File "/usr/local/autotest/server/subcommand.py", line 93, in parallel_simple
function(arg)
File "/usr/local/autotest/results/69041135-chromeos-test/chromeos3-row1-rack2-host4/control.srv", line 36, in run_chaos_wpa2psk
runner.run(job)
File "/usr/local/autotest/server/cros/chaos_lib/chaos_runner.py", line 242, in run
utils.power_off_VM(webdriver_master, webdriver_instance)
File "/usr/local/autotest/server/cros/network/chaos_clique_utils.py", line 83, in power_off_VM
master.run(power_off_cmd)
File "/usr/local/autotest/server/hosts/ssh_host.py", line 190, in run
options, stdin, args, ignore_timeout)
File "/usr/local/autotest/server/hosts/ssh_host.py", line 157, in _run
raise error.AutoservRunError("command execution error", result)
AutoservRunError: command execution error
stderr:
VBoxManage: error: Invalid machine state: PoweredOff
* Command:
/usr/bin/ssh -a -x -o ControlPath=/tmp/_autotmp_qoEfU7ssh-master/socket
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/tmpXzPE2b -o
BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=300 -l
chaosvmmaster -p 22 chromeos3-chaosvmmaster.cros.corp.google.com " if type
\"logger\" > /dev/null 2>&1; then logger -tag \"autotest\"
\"server[stack::run_chaos_wpa2psk|run|power_off_VM] -> ssh_run(VBoxManage
controlvm chromeos3-chaosvm4 poweroff)\";fi; VBoxManage controlvm
chromeos3-chaosvm4 poweroff"
Exit status: 1
Duration: 0.21581697464
stderr:
VBoxManage: error: Invalid machine state: PoweredOff (must be Running, Paused or Stuck)
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
VBoxManage: error: Context: "PowerDown(progress.asOutParam())" at line 222 of file VBoxManageControlVM.cpp
If the vm is powered off why do we attempt to power it off again? In the code, i see that we do unconditional power on/off. It looks like this may lead to issues when we perform operation on invalid states of the vm. Would be better to get the current state of a before running power on/off.
,
Aug 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/85418ab3321d272e07ec798455d41fe0f354c75f commit 85418ab3321d272e07ec798455d41fe0f354c75f Author: Tien Chang <tienchang@google.com> Date: Wed Aug 03 19:51:12 2016 chaos: Reorder steps of powering on/off VMs and creating SSH tunnel. Changes include: 1) Ensure VM is powered on before creating SSH tunnel. 2) Add a check 'is_VM_running' to always power on (instead of always power off). 3) Add a check (and retries) to verify webdriver port is listening from drone. 4) Clarify power_on_VM debug message. BUG=chromium:623644, chromium:627947 TEST=locally ran ConnectDisconnect.debug against 1 dynamic AP, both with an initially powered off VM and an initially powered on VM, on both cros and adb Change-Id: I7f2e3b3a4bcaec567cefa0eb2b9ac04b61c4daea Reviewed-on: https://chromium-review.googlesource.com/365882 Reviewed-by: Tien Chang <tienchang@chromium.org> Commit-Queue: Tien Chang <tienchang@chromium.org> Trybot-Ready: Tien Chang <tienchang@chromium.org> Tested-by: Tien Chang <tienchang@chromium.org> [modify] https://crrev.com/85418ab3321d272e07ec798455d41fe0f354c75f/server/cros/chaos_lib/chaos_runner.py [modify] https://crrev.com/85418ab3321d272e07ec798455d41fe0f354c75f/server/cros/network/chaos_clique_utils.py
,
Nov 1 2016
Fixed and Verified. |
||
►
Sign in to add a comment |
||
Comment 1 by bmahadev@chromium.org
, Jul 13 2016