Commit Graph

23 Commits

Author SHA1 Message Date
David James
f5850903d9 Tweak ssh settings to detect when remote server dies.
Right now, it seems that we don't consistently detect when the kvm is rebooted.
To improve this, I've added ServerKeepAlive messages, such that our connection
will be dropped if the target host is unreachable for 15 seconds. Further, I've
also tightened the ConnectTimeout from 120 seconds to 30 seconds so that we
detect timeouts earlier, but added 4 retries, so that all connections are
robust to temporary unresponsiveness (e.g. ssh server restarting).

BUG=chromium-os:21082, chromium-os:20305
TEST=alex-binary trybot run.

Change-Id: Ibd000bc3158138ee9c617e56bd7b11d4bd8bcb61
Reviewed-on: http://gerrit.chromium.org/gerrit/8574
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2011-09-30 22:29:41 -07:00
Chris Sosa
faeee5f47c Add more debugging by re-running ssh commands that failed verbosely.
This CL changes remote_ssh to re-run the command verbosely if the
command failed with an SSH error (code 255).

BUG=chromium-os:19198
TEST=Ran it.  Simulated SSH error by closing KVM instance in cros_run_vm_update
while it was intiializing.  Saw re-run verbosely run correctly.

Change-Id: I9f95aac3fb2d00bc7d26b0b9298409d8ce2db594
Reviewed-on: http://gerrit.chromium.org/gerrit/8313
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-09-26 20:19:34 -07:00
Gaurav Shah
af7d5d11a5 remote_access.sh: Be verbose when remote accesss setup fails. Silent otherwise.
A parallel change in run_remote_tests.sh (http://gerrit.chromium.org/gerrit/8090)
ensures that the output of the command isn't ignored (since now it is only verbose
when it needs to be).

BUG=chromium-os:20695
TEST=Ran run_remote_tests.sh with both valid and invalid ip (again).

Change-Id: I185c81b0a8193bfa5f88ff2b9eea38dabe24edcc
Reviewed-on: http://gerrit.chromium.org/gerrit/8089
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-09-25 14:32:13 -07:00
Andrew de los Reyes
e08639b859 remote_access.sh: add remote_sh_raw for a non-buffered ssh connection.
BUG=chromium-os:20305
TEST=manual test of image_to_live.sh

Change-Id: I964088673d0dc2867e911368d9cc4ec73085a4f4
Reviewed-on: http://gerrit.chromium.org/gerrit/8082
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2011-09-21 15:53:30 -07:00
David James
985cd88444 Add connection timeout to ssh attempts.
BUG=chromium-os:19210
TEST=Run a few dozen cbuildbot runs.

Change-Id: I276f23135bfe1dfc95575ffd15507cce6fb2461c
Reviewed-on: http://gerrit.chromium.org/gerrit/6383
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-08-23 11:29:51 -07:00
Mandeep Singh Baines
175422fec6 remote_access.sh: fix learn_arch to return x86 instead of i686
learn_arch is only called by update_kernel.sh. Until recently, we
were only using learn_arch to detect whether the device is arm or not.
However, with a recent change, update_kernel.sh is now passing the
arch flag to vbutil_kernel which only knows about x86 and not i686.

BUG=chromium-os:15932
TEST=Before change update_kernel.sh fails on x86 and now it works.

Change-Id: Idafc71c017c8ed0595fd0260fce63f327ff021bd
Reviewed-on: http://gerrit.chromium.org/gerrit/1831
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Mandeep Singh Baines <msb@chromium.org>
2011-05-31 14:31:49 -07:00
Chris Sosa
24da49e6ee Revert remote_access refactor.
Reverts http://codereview.chromium.org/6322002/

Change-Id: I3cf60747b4d25bf6c8ad8f290fc46cf360b8c074

BUG=chromium-os:11568
TEST=Ran it

Review URL: http://codereview.chromium.org/6349036
2011-02-01 17:06:12 -08:00
Olof Johansson
f53fa0d5f8 update_kernel: first cut at arm support
Change-Id: I5dc22223559d3cdad357530af66c14115da63c89

BUG=n0ne
TEST=update_kernel to seaboard (and mario for regression test)

Review URL: http://codereview.chromium.org/6031005
2011-01-26 13:06:46 -08:00
Chris Sosa
637b55326b Passes cache location to tests and runs the tests in parallel.
As a warning, this is a pretty big change.  At a high-level,
this changes the harness to move the managing of the devserver from
image_to_live into the actual test harness.  Paths of the cache locations (for
archive_url) are taken when pre-generating the updates and stored
in a dictionary (maps "path_to_base->path_to_target" (or path for full updates)->
cache paths).

This change also has the tests run in parallel.  Because we now start
X number of VM's at once, each VM needs it's own pid file and ssh_port.
This logic was added as well as running the actual tests in parallel.

Change-Id: I1275d79740c50c2a8028489b43dcbbcf5bbd56c4

BUG=chromium-os:10723
TEST=Ran it ... a lot with -q but without a test_prefix (so full test suite).

Review URL: http://codereview.chromium.org/6277015
2011-01-24 14:48:02 -08:00
Mandeep Singh Baines
aef91ad564 remote_access.sh: remove dependence on ssh-agent
This is take 2 of this CL. Modified run_remote_test.sh to
explicitly start an ssh-agent if necessary instead of
implicitly relying on remote_access.sh to do it.

BUG=n0ne
TEST=Verified I could successfully ssh.

Change-Id: I4e70b8574af1119dcf36768f6602ecc0cabedc31

Review URL: http://codereview.chromium.org/6288004
2011-01-14 14:17:25 -08:00
Chris Sosa
5c9571a926 Revert "remote_access.sh: remove dependence on ssh-agent"
This reverts commit 78476aba5f.

BUG=
TEST=Reverted on bot and re-ran test suite

Review URL: http://codereview.chromium.org/6311002

Change-Id: Ib9405dac19b8b19d89e5d2346f5e1fd130a7280f
2011-01-13 13:12:55 -08:00
Chris Sosa
bb4661dee7 Put wait around remote_reboot core code itself rather than around the ping.
The last CL had a race condition where we could ping but not run the reboot_check code.
This CL moves to watch the reboot_check code rather than a ping.

Change-Id: I8bdda97850ac085be9cf5dfb0b80fb7e1c8dd212

BUG=chromium-os:10867
TEST=Ran it 100 times without error.

Review URL: http://codereview.chromium.org/6287001
2011-01-13 11:19:02 -08:00
Mandeep Singh Baines
78476aba5f remote_access.sh: remove dependence on ssh-agent
Change-Id: I68d02f5630bd885894ca69728254f2a5ba5cc2aa

BUG=n0ne
TEST=Verified I could successfully ssh.

Review URL: http://codereview.chromium.org/6314001
2011-01-13 11:16:51 -08:00
Chris Sosa
60587527c1 Add more robust ssh ping to be run on reboot for updates.
Upon investigation it seems there's a race condition when ssh
starts up the first time.  This adds a much more robust way to
ping a machine when it's up then the previous method.

Change-Id: I092744b259c169975d1c4f283f01a556fce24723

BUG=chromium-os:10867
TEST=Ran it 30 times with image_to_live --noupdate --nostateful_update.

Review URL: http://codereview.chromium.org/6115009
2011-01-12 15:10:35 -08:00
Mandeep Singh Baines
a63cd2d648 Create a new command update_kernel.sh
This command can be used to update the kernel of a ChromiumOS target.

Much thanks to snanda for the inspiration and instructions.

BUG=9864
TEST=Verified that it works.

Change-Id: I66f7d940e0dc59b0e1a50409a7155fe0ba7157fe

Review URL: http://codereview.chromium.org/5550001
2010-12-02 11:58:26 -08:00
Paul Stewart
b94e40293d Add port flag to remote_rsync_from
Ass ${FLAGS_ssh_port} to ssh arguments for rsync

BUG=chromium-os:9187
TEST=Run rsync-related script with port argument

Change-Id: Iefabef230cfff03dcd66ac0c24798bb4b13ce40d

Review URL: http://codereview.chromium.org/4998004
2010-11-15 14:11:49 -08:00
Chris Sosa
cc09f84b5e Update scripts for vm's
Change-Id: I63bdcaa3630c179d407310f6544c102f5353fa4d

BUG=5530
TEST=Ran both cros_run_vm_test and new script and had the latter update successfully.

Review URL: http://codereview.chromium.org/3427011
2010-09-21 17:09:51 -07:00
Ken Mixter
cc4f1dd14e Script to generate post mortem of all crashes on device
BUG=4887

TEST=tested run_remote_tests and image_to_live still work.  Ran script with machine with no crashes, as well as on a machine with a slew of powerd CHECK(false)'s.

Change-Id: Iffb6571d30d99d876f41972f92a7149a716035ee

Review URL: http://codereview.chromium.org/3276002
2010-08-31 12:07:11 -07:00
Zelidrag Hornung
61d9768584 added support for an alternative ssh port for autotest (needed for running autotest on Vibrant VM)
Review URL: http://codereview.chromium.org/2845002
2010-06-15 11:55:21 -07:00
Chris Sosa
ef96430135 Changes to image_to_live to copy stateful partition over
Review URL: http://codereview.chromium.org/1784006
2010-04-27 13:21:08 -07:00
Sean O'Connor
9969ce9238 Make run_remote_test's use of ssh-agent more predictable.
Review URL: http://codereview.chromium.org/560005
2010-02-01 17:10:03 -08:00
Sean O'Connor
a6db82ed3e Cleanup and merge autotest wrappers.
Review URL: http://codereview.chromium.org/546137
2010-01-27 12:11:08 -08:00
Ken Mixter
689b9ee48e Simple way to run client/server autotest(s) from server.
This is a script to run client or server autotests on a live Chromium OS instance, collect results, and optionally upload the to an autotest database.  This includes functional and performance tests.  We assume the remote instance is running an appropriate image installed (one created using mod_image_for_test.sh and possibly installed using image_to_live.sh).

An example run might be

run_remote_tests.sh --remote=192.168.1.5 BootPerfServer -o results.txt

This example will run src/platform/testing/server_tests/system_BootPerfServer
5 times on instance at 192.168.1.5 and collect results in result.txt.

Also refactors and improves readability in image_to_live.sh.

Review URL: http://codereview.chromium.org/519041
2010-01-07 18:23:52 -08:00