History log of /external/autotest/server/server_job.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f4e857a0b195591b351082bf6e60ed6f3f54fc49 22-Nov-2017 Xixuan Wu <xixuan@chromium.org> autotest: skip crashinfo collection if job is in fast mode.

BUG=chromium:787232
TEST=Ran server job in fast or not on local autotest.
Ran unittest.

Change-Id: I7ac4532800d5b4ed5724ce2b8357b959fde73c58
Reviewed-on: https://chromium-review.googlesource.com/783950
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
60325a6e8076bd7c0f14cde9cd837fbad139001a 21-Nov-2017 Xixuan Wu <xixuan@chromium.org> autotest: skip get_network_stats if job is in fast mode.

BUG=chromium:787232
TEST=Ran server job in fast or not on local autotest.
Ran unittest.

Change-Id: I031d14a7eceae4eefd9ec01f6174185d8938b841
Reviewed-on: https://chromium-review.googlesource.com/780502
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
288b0fcb5ace162767e9c30afdc2bc23f488c3c0 16-Nov-2017 Xixuan Wu <xixuan@chromium.org> autotest: parse num_tests_failed in record for server job.

BUG=chromium:782501
TEST=Ran server & client & suite job in lcoal autotest.

Change-Id: Iefb6c82afdf10cb78139bc7ab8405e996fc4b817
Reviewed-on: https://chromium-review.googlesource.com/777719
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
cd36ae0a377f228c69f58d7c5c854ee1a7abf94b 10-Nov-2017 Xixuan Wu <xixuan@chromium.org> autotest: Enable passing in parameters from create job page.

BUG=chromium:782501
TEST=Ran client job & suite job on local autotest. Verify that fast is
injected into control file.
Ran unittest.

Change-Id: I061694392fb3b789a5135ad2af241f2b0886123a
Reviewed-on: https://chromium-review.googlesource.com/764431
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
d5abdab1c2a822aa8d9c980cfe61746f5681d261 08-Feb-2017 Allen Li <ayatane@chromium.org> [autotest] Merge server/autotest.Autotest

BUG=chromium:672727
TEST=Trybot
TEST=Run a local dummy suite

Change-Id: Ie27e15f3ddc6430ee82e3e30b6b7f72b557a2ba6
Reviewed-on: https://chromium-review.googlesource.com/438763
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
/external/autotest/server/server_job.py
c846c338f550112a5e9bd27549922b1d2c0b2a0a 28-Jul-2017 Justin TerAvest <teravest@chromium.org> Remove distibute_across_machines.

After https://chromium-review.googlesource.com/c/579652/ allows us to
remove the control.benchmarks file and the associated large
distribute_across_machines supporting code.

BUG=None
TEST=None

Change-Id: Idd5d203f2142f4179abf629a92a044edfd5a8957
Reviewed-on: https://chromium-review.googlesource.com/591048
Commit-Ready: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
/external/autotest/server/server_job.py
588007d9c0db0c4b6e29ab38bb140cc8c8230b0c 15-Jun-2017 Prathmesh Prabhu <pprabhu@chromium.org> [autotest] Use ShadowingHostInfoStore in autoserv

Instead of using an AfeStore to obtain host information from the AFE,
this CL switches to a ShadowingHostInfoStore. The information still
comes from the Afe, but is shadowed by a file on disk. Any differences
between the local store and Afe are reported to monarch.

BUG=chromium:678430
TEST=Run a job on local autotest instance with and without ssp.

Change-Id: Ifa3da3c3449ac08bfc53dcef0c3e871b36b69602
Reviewed-on: https://chromium-review.googlesource.com/537976
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/server/server_job.py
d08c86bd1b0371b6c7b77aae3b6c92366a18e887 22-Jul-2017 Prathmesh Prabhu <pprabhu@chromium.org> [autotest] Respect machine dict in parallel_simple

A long time ago, the machines list passed in to server_job was converted
from a list of strings to possibly a list of dicts. Some places didn't
get this update. Fix another one.

BUG=chromium:746751
TEST=(1) (new) unittests
(2) Ran a local autotest_SyncCount job and verified that subdirs
names are correctly inferred.

Change-Id: I7479241d97155e639c85a6b5469d134c1f48eba8
Reviewed-on: https://chromium-review.googlesource.com/582234
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@google.com>
Reviewed-by: Laurence Goodby <lgoodby@chromium.org>
/external/autotest/server/server_job.py
06893307aebfa1836d1b9e9f94043c0d95a3bb9b 24-Jun-2017 Hidehiko Abe <hidehiko@chromium.org> Share SSH Master connection across control scripts.

BUG=chromium:726481
TEST=test_that locally. Ran trybots.

Change-Id: I39993f9179aa50690e987f5d2d34892cbe00ee44
Reviewed-on: https://chromium-review.googlesource.com/547077
Commit-Ready: Hidehiko Abe <hidehiko@chromium.org>
Tested-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
20ea106295a4a2fde5b7d1d976b40e607c75ca71 06-Jul-2017 Prathmesh Prabhu <pprabhu@chromium.org> [autotest] Merge site_server_job

BUG=chromium:684311
TEST=unittests, moblab trybot

Change-Id: I2528c2166c7753040d5799fad030e94f757e5590
Reviewed-on: https://chromium-review.googlesource.com/562220
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/server/server_job.py
87fecd1dcfdec1d77ac717d0d8efc81936409da2 06-Jul-2017 Prathmesh Prabhu <pprabhu@chromium.org> [autotest] Make _get_job_data class method

BUG=chromium:684311
TEST=unittests

Change-Id: I8db532aaa42da694c083bdff195affc1584fc758
Reviewed-on: https://chromium-review.googlesource.com/562219
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
/external/autotest/server/server_job.py
010c0bcc9c7d91c451534d95b12305649627c180 22-Jun-2017 Dan Shi <dshi@google.com> [autotest] Move result_utils to its own package

This change moves result_utils.py to its own package. More code will be added to
enable result throttling. So it's more manageable to put all related files to a
single folder.

This change also push the result tools modules to client before trying to build
result summary. This removes the client side dependency. So all result
throttling logic will be kept on the server side.

BUG=chromium:716218
TEST=unittest, local run dummy tests

Change-Id: Icc3542af99439fd39b1dba36ac45aab6effd1080
Reviewed-on: https://chromium-review.googlesource.com/544049
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
f53d1269ad7321116eadcb0167d81dbea9bf4bef 19-Jun-2017 Dan Shi <dshi@google.com> [autotest] Allow control file to specify maximum test results to collect

Control file can set an attribute MAX_RESULT_SIZE_KB to specify the maximum
test result size to collect. By default, it will be 20MB if
`enable_result_throttling` is set to True in global config.

BUG=chromium:716218
TEST=unittest, local run dummy tests

Change-Id: Ia6b9a04d92ec91179ceb99466b5e9d6a5d1b3ef3
Reviewed-on: https://chromium-review.googlesource.com/540196
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
cbeab1213ad41c3631a71c97ec3eddc1aee20049 30-May-2017 Prathmesh Prabhu <pprabhu@chromium.org> [autotest] Respect exclusive --in-lab or --host-attributes arguments

These two arguments to autoserv are not intended to be used together.
The only user of --host-attributes are test_that / test_droid that use
it for tests run outside the context of the lab via
test_runner_utils.perform_run_from_autotest_root.

This CL enforces this mutual exclusion to make way for a future CL that
depends on this property.

+ As we begin to use HostInfoStore for storing the attribute
information, copy the host_attributes into the store.

BUG=chromium:678430
TEST=(1) test_that / test_droid still works.
(2) in-lab hwtests via moblab.
CQ-DEPEND=CL:519569

Change-Id: I0dcb3096a4797143df796855bf3babc155e76c67
Reviewed-on: https://chromium-review.googlesource.com/517771
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/server/server_job.py
271962fa1dd0e9f690f164d672fb3ddad8968ef6 03-Feb-2017 Prathmesh Prabhu <pprabhu@chromium.org> [autotest] Handle exceptions directly in run_test

Instead of obtain sys.exc_info() and then recreating an exception
immediately from it.

BUG=chromium:682417
TEST=None

Change-Id: Iccc0ff4c1b7a84e22ef8b3f812a244e6b0446254
Reviewed-on: https://chromium-review.googlesource.com/437609
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@google.com>
/external/autotest/server/server_job.py
0afec4251b91fbbe55223325055ba1d88f857598 03-Feb-2017 Prathmesh Prabhu <pprabhu@chromium.org> server_job: Use new style except statements

BUG=chromium:682417
TEST=None

Change-Id: I47465b5163db7d74f7e0afce4ed801bd7e4271aa
Reviewed-on: https://chromium-review.googlesource.com/437607
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@google.com>
/external/autotest/server/server_job.py
e70648162260bfd46a56fd1a1d1d7f86ec01e600 03-Feb-2017 Luigi Semenzato <semenzato@chromium.org> TKO parser: improve some error messages in debug log

These changes try to make it clearer that the errors
aren't critical to the execution of the test, and also
slightly reduce the spew to improve log readability.

BUG=chromium:659741
TEST=none

Change-Id: I1a2332becb6d6d1fbd5f23f39dbbc502a631d37c
Reviewed-on: https://chromium-review.googlesource.com/437707
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
/external/autotest/server/server_job.py
07b5d9844b3966fed42517713f7510921e48a257 11-Jan-2017 Prathmesh Prabhu <pprabhu@chromium.org> server_job: Add host_info_store to the machine dict.

BUG=chromium:678430
TEST=None.

Change-Id: I39fc3bd5a1ff84bc19fab7d7a05d4d0653cf6b03
Reviewed-on: https://chromium-review.googlesource.com/426920
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
/external/autotest/server/server_job.py
28616daf6f224d3cd50fac20bb0113f83654025c 11-Jan-2017 Prathmesh Prabhu <pprabhu@chromium.org> server_job: Simplify afe_host creation logic.

... a bit.

BUG=chromium:678430
TEST=None.

Change-Id: I8dffbbe7a6337843cfd1120150f4117982ca84ed
Reviewed-on: https://chromium-review.googlesource.com/427239
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@google.com>
/external/autotest/server/server_job.py
429d100e972f8ed44bd54e168f462d640cd6299b 11-Jan-2017 Prathmesh Prabhu <pprabhu@chromium.org> server_job: extract get_machine_dicts.

BUG=chromium:678430
TEST=unittests.

Change-Id: If31d906a73deb5d8cc7c776919c2a9cd3a295329
Reviewed-on: https://chromium-review.googlesource.com/426767
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
/external/autotest/server/server_job.py
ab02091f8b92db4b00bfe21de593a7f414332c38 20-Sep-2016 Allen Li <ayatane@chromium.org> [autotest] Don't process crashdumps for passing tests

More accurately, if no tests during a given job failed, skip
symbolication of crashdumps.

BUG=chromium:623739
TEST=Run autotest jobs locally.

Change-Id: I8dda3f3714d3047e0398aef36915adaa5b4cf0ea
Reviewed-on: https://chromium-review.googlesource.com/387110
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/server/server_job.py
9aec6930955ea7d3d345cf2d214f9e6982f84cb8 03-Jun-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Remove the last of the support for kernel selection.

This removes all the vestiges related to support selecting a kernel
for test from client side code. This completes removal of all such
code from the Chrome OS fork of Autotest.

N.B. It's possible that there are still design concepts within the
code that exist primarily for the benefit of kernel selection.
Finding and simplifying those design concepts are left for the
next intrepid developer.

BUG=chromium:266704
TEST=Run push_to_prod suite in a local instance.

Change-Id: I7a8bbee0f58c14c4826689d5d04999b3708ad5f6
Reviewed-on: https://chromium-review.googlesource.com/349710
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/server/server_job.py
05ae2a45397188dd7d7adbc49a61095ebf85e151 06-Jun-2016 Kevin Cheng <kevcheng@chromium.org> [autotest] Store afe_host in and remove host attributes to/from machine dict.

There are multiple times when the AFE is queried for random bits of info
(host attibutes, labels, etc). To reduce the number of calls, store the
AFE host object into the machine dict so we can store it into the host class.
I chose the AbstractSSHHost class to grab it out of the arg dict since that
is used both by CrosHost and ADBHost.

Also removed host attributes as a class instance attribute since
afe_host contains all that info already.

Also use the os labels to do host class detection.

BUG=chromium:546741
TEST=Tested a couple scenarios:
- Manually on moblab to make sure cros/adb/testbed devices all pass
dummy tests.
- Trybot job on gnawty-paladin.
- Moblab dummy suite run to ensure no breaking backward compatibility changes
(moblab on R52 and testing with a tryjob gnawty build).
- test_{that,droid}.py on a cros/adbhost device.

Change-Id: I101c478c0f27f9fd444ccd4699a5c94e76d3b17e
Reviewed-on: https://chromium-review.googlesource.com/349990
Commit-Ready: Kevin Cheng <kevcheng@chromium.org>
Tested-by: Kevin Cheng <kevcheng@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
/external/autotest/server/server_job.py
542d0d512c74a241c68a95e2de7f114c979499cd 29-Jun-2016 Luigi Semenzato <semenzato@chromium.org> autoserv: get transmitted/received byte counts at test beginning/end.

This adds to the autoserv log TX and RX byte counts obtained
from the network card on the DUT. It is done by adding a new
control segment, GET_NETWORK_STATS, which fails quickly if
the DUT is not immediately reachable.

Example output:
13:28:25 INFO | autoserv| get_network_stats: at-start RXbytes 56436340 TXbytes 109524115
...
13:28:42 INFO | autoserv| get_network_stats: at-end RXbytes 56595766 TXbytes 115204781

(this is from client/site_tests/hardware_DiskSize)

BUG=chromium:621319
TEST=ran with one autotest from client/site_tests

Change-Id: I5b1892ac58d8b6bffdaa2d9293703f1bf05f97be
Reviewed-on: https://chromium-review.googlesource.com/357131
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
ab9769f9a8c1cfefc95cd08ba69e4e2d72a64d24 02-Jun-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Remove some dead code from server/hosts.

This removes dead code from server related to selecting which kernel
to boot during test jobs. This doesn't remove all references to
code for this feature:
* There is dead code that could trigger the code deleted here (if
it weren't dead).
* This change creates more unreferenced code that has yet to be
deleted.

BUG=chromium:266704
TEST=unit tests, run in a local instance, grep for dangling references.

Change-Id: I706f46ca51bfa7e5455c8cf4d535bfbd09c6ed21
Reviewed-on: https://chromium-review.googlesource.com/348830
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
5f5579e6f825cf33bb022c08a1b2ab95bcb9d1d7 11-May-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Bury more virtualization code.

This deletes two unused modules and tests related to kvm virtualization.

BUG=None
TEST=git grep, see that the modules are unused

Change-Id: I317c1d9d64d3663f7209a85e3f4048f80281dd39
Reviewed-on: https://chromium-review.googlesource.com/343919
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
5d79aefec432af28333daa8997080ee26cb54edf 05-Feb-2016 Simran Basi <sbasi@google.com> [autotest] Set TestBed.job

Adds the same magic that assigns Host.job to TestBed.

BUG=chromium:584541
TEST=modified testbed_DummyTest to hit afe_utils.host_in_lab then ran:
./test_droid.py emulator-5554,92c52320 testbed_DummyTest

Change-Id: I7aeccac7e0995fa60d3c66f0ae0fc5cee0bd2df5
Reviewed-on: https://chromium-review.googlesource.com/326200
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
/external/autotest/server/server_job.py
5adbce8cbe706b18e18748199523d1963cf999d2 11-Dec-2015 Dan Shi <dshi@google.com> [autotest] Fix a bug in machine list comparison.

CL 315230 changed the "machines" variable in a job run to a list of
dictionaries, e.g.,
[{'host_attributes': {}, 'hostname': '100.96.51.226'}]
This breaks the logic in _make_parallel_wrapper, which it checks if
the autoserv run needs to fork based on the comparison of machines and
self.machines, which is still a list of hostnames.

This change converted the list of dictionaries back to a list of hostnames.

BUG=chromium:568802
TEST=local run a client side test, make sure status.log is not empty

Change-Id: Id7be1852b13418bf1b23caaa202418f3381fe51a
Reviewed-on: https://chromium-review.googlesource.com/317579
Commit-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
/external/autotest/server/server_job.py
c439b6a9cceb3fe156a10aaf817657d9f37309dd 11-Dec-2015 Fang Deng <fdeng@chromium.org> [autotest] santinize string which goes into job_abort_reason.

autoserv will fail to output anything into status.log
if job_abort_reason contains bad characters.

This CL santinizes the string.

BUG=chromium:411968
TEST=force an exception to throw with bad characters in the string
and make sure the job did not crash.

Change-Id: Ie01e4ff03b6f30d94d9b797962ff937df64f2395
Reviewed-on: https://chromium-review.googlesource.com/317359
Commit-Ready: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/server/server_job.py
1bf60eb788365f083d0ee8045a6556f906149dec 02-Dec-2015 Simran Basi <sbasi@google.com> [autotest] autoserv add --lab & --host_attributes arguments

Added two new flags to autoserv.

--lab indicates that autoserv is running in the lab and has
the full Autotest infrastructure at its disposal.

--host_attributes allows host attribute information that is
usually in the database to be retrievable from the command
line arguments.

If --lab is pulled in, autoserv will request the host attributes
from the database at test runtime.

From here this change, then updates the concept of the "machines"
list that test control files receive to now be a list of dicts
that contain the machine hostname and host attributes. This will
enable identifing information the hosts library needs to create
host objects to be available whether or not there is a database
present.

BUG=chromium:564343
TEST=local autoserv runs. Also verified scheduler changes work
via MobLab. waiting on trybot results.
DEPLOY=scheduler

Change-Id: I6021de11317e29e2e6c084d863405910c7d1a71d
Reviewed-on: https://chromium-review.googlesource.com/315230
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
/external/autotest/server/server_job.py
9603cd19499048c30856f2de2f821c937b33cb6f 07-Dec-2015 Christopher Wiley <wiley@google.com> Remove conmux

It isn't clear what the original authors had in mind for this code, but
we don't seem to use it. Remove one more piece of cruft from the
autotest codebase.

BUG=None
TEST=None

Change-Id: I35e9d212feb54106fa6f27f36f075e4f1924d567
Reviewed-on: https://chromium-review.googlesource.com/316430
Commit-Ready: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/server/server_job.py
c2d99cf743c86fe0519f155ffbcad54df31bd742 18-Nov-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Remove the concept of 'protection level' from repair.

In original Autotest, hosts have a 'protection level' that is
passed to repair jobs in order to limit the specific kinds of repair
that can be done. For the CrOS lab, this concept is largely not
useful; we want a uniform repair procedure determined by the kind of
DUT being repaired, not by a database configuration.

This removes the concept of 'protection level' from the repair flow;
repair steps are now determined only by the class of Host that
handles the operation. The protection level remains in the
database, but the only meaningful value is 'Do not verify'. That
setting on a host will prevent it from running any verify, cleanup,
or repair tasks. This is done for the sake of non-DUT hosts that
exist in the CrOS lab AFE database.

BUG=None
TEST=unit tests, and run repair in a local instance

Change-Id: I1d512eb2b1fe604b70fec00b3a290f5f6b9d9beb
Reviewed-on: https://chromium-review.googlesource.com/312979
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/server/server_job.py
70647cafbd061a7754ac304fd9dc067f2b6dbab4 17-Jul-2015 Dan Shi <dshi@chromium.org> [autotest] Save parent job id, build, board and suite info to tko_jobs.

parent job id is passed in through autoserv commandline. autoserv saves the
value to keyval file in results folder. The parser job then reads the parent
job id from keyval file.

build, board and suite info are parsed from job name. The label column in
tko_jobs is essentially the job name. However, that column has a size limit of
100 characters, thus the name could be truncated. This CL parse the actual job
name to get the build, board and suite info and save to tko_jobs table.

BUG=chromium:509770,chromium:509901
TEST=local test
CQ-DEPEND=CL:285026

Change-Id: I06b073b052a9d07ffd36308b1682a7bc12699898
Reviewed-on: https://chromium-review.googlesource.com/286265
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/server/server_job.py
b669cbdea7f4bfc9cbfcea48d9cf9ce62f0deff5 13-Sep-2013 Dan Shi <dshi@chromium.org> [autotest] Disable install autotest from job_repo_url for test_that

use_packing option for autotest._install method is True by default. When using
test_that to run test, DUT will try to install autotest package from
job_repo_url with server configured in global_config (cautotest). For DUT not
located in lab, there is no job_repo_url existed for such DUT in cautotest, and
therefore autotest will try to copy over the local files. However, when a user
try to use a DUT in the lab to run test_that, autotest package is downloaded
and installed from job_repo_url. That leads to a problem that developers can't
use test_that to verify autotest code.

The fix is to add a new option no_use_packaging to autoserv, and thread the
option to autotest._install. The option is set to False by default, and set
to True in test_that. Also, when this argument is set to True, any package
installation will use AutoservFetcher.

BUG=chromium:265673
TEST=run following command and confirm local autotest code is copied over to
the DUT: test_that -b lumpy 172.22.75.225 dummy_Pass

Change-Id: I365f5f7dc79c8e65cddaa0af77f1f1a1e4b0012a
Reviewed-on: https://chromium-review.googlesource.com/169343
Reviewed-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Mungyung Ryu <mkryu@google.com>
Tested-by: Mungyung Ryu <mkryu@google.com>
/external/autotest/server/server_job.py
cf4d2032ea4bf5af680383f36308d581876bbbb0 12-Mar-2015 Dan Shi <dshi@chromium.org> [autotest] Update autoserv to support server-side packaging.

Code change is made so autoserv will honer the --require-ssp arg. When the
argument is specified, autoserv will:
1. Try to locate server-side package based on --image, host attribute
job_repo_url and host's cros-version label.
2. If no server-side package can be staged, the job will be run without ssp.
3. If package can be staged, autoserv will start a container to run the test.
a) parent autoserv process's log will be stored in [results]/wrapper folder.
b) A container will be created from base container, with proper setup.
c) The same autoserv command line (with update on result path and control
etc.), will be executed inside the container.
d) Parent autoserv process will wait for above command to finish and destroy
the container afterwards. If the test job was aborted, container should
also be destroyed.

BUG=chromium:453624
TEST=local setup and run test command:
/usr/local/autotest/server/autoserv -p -r /usr/local/autotest/results/16-debug_\
user/$result_dir -m 172.27.215.232 -u udebug_user -l dummy_PassServer -s -P \
16-debug_user/$result_dir -n /usr/local/autotest/results/drone_tmp/attach.2 \
--verify_job_repo_url --require-ssp
create job from afe:
http://dshi.mtv.corp.google.com/afe/#tab_id=view_job&object_id=19

Change-Id: Ida36374dd500cd1fd0b67a86ab8c0198ade4cc36
Reviewed-on: https://chromium-review.googlesource.com/259834
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/server/server_job.py
ec1d47d85cc83f30631518d8fbb6406036a3ac39 13-Feb-2015 Dan Shi <dshi@chromium.org> [autotest] Add support for scheduler to honor require_ssp attribute in control file

This CL adds changes to pipe require_ssp attribute in control file to autoserv
command. Following are the work flow:

1. The control file parser stores require_ssp attribute value in afe_jobs table.
2. QueueTask compiles command line list, --require-ssp option will be added to
the command line list if following conditions are met:
a. AUTOSERV/enable_ssp_container in global config is True
b. The test is a server-side test
c. require_ssp for the job entry is None or True.
3. When agent_task tries to call run method to run the command, it will check if
there is any drone supporting server-side packaging first. If no drone is found,
the agent task will will run the command in a drone without using server-side
packaging. A warning will be posted in the autoserv log.
4. If a drone without SSP supported is assigned to a test requires SSP, the test
will be run without ssp.

BUG=chromium:453624
TEST=unittest, local test:
set AUTOSERV/enable_ssp_container to True in shadow config;
Create a job for dummy_PassServer in AFE, check require SSP, confirm the job
succeeds but with a warning in the autoserv log.

Create a job for dummy_PassServer_nossp in AFE, uncheck require SSP, confirm
the job passes without warning in the autoserv log.

set AUTOSERV/enable_ssp_container to False in shadow config, restart scheduler.
Create a job for dummy_PassServer in AFE, check require SSP, confirm the job
succeeds without warning in the autoserv log.

also run test_that in local chroot to make sure test_that is not affected.

DEPLOY=apache,scheduler, db migrate must be done before push this CL to prod.

Change-Id: I02f3d137186676ae570e8380d975a1bcd9ffbb94
Reviewed-on: https://chromium-review.googlesource.com/249841
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/server/server_job.py
ad78aca982907e3a21d93c1d7085840877b92e3d 03-Oct-2014 Fang Deng <fdeng@chromium.org> [autotest] Cleanup follows the same code path as other special task.

Cleanup has been treated differently from other special task.
When --cleanup is specified, autoserv follows the
code path of excuting a normal test control file (but no test
will be run since scheduler won't pass a control file to autoserv
with --cleanup)

Because of this behavior, crashdump control segment will always
be run before cleanup control segment. This is not necessary,
especially with our new crashcollect flow.

Also in the currently code path, the provision-able labels are
not passing to cleanup job, thus not working.

This CL makes cleanup follows the same code path
as other special tasks like repair, reset, verify.

BUG=None
TEST=1) run autoserv manually with --cleanup
2)run dummy_Fail, which trigger Cleanup

Change-Id: Ib5d413f29954b041344670b8a2ed5ab33f6c01b1
Reviewed-on: https://chromium-review.googlesource.com/221358
Reviewed-by: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
/external/autotest/server/server_job.py
44ae92356778ad873ec33f9d912b579bed158574 21-Jun-2014 Alex Miller <milleral@chromium.org> [autotest] Disable incremental updating of TKO from server job.

This is meant for long running tests so that one can see progress from a
frontend, but we've never used this feature, and it's costing us mysql
connections, load, and now bugs.

BUG=chromium:385232
TEST=test_that ran fine

Change-Id: I689ae7c184d8bc6ea3b5f755150906e5031885a8
Reviewed-on: https://chromium-review.googlesource.com/205133
Reviewed-by: Prashanth B <beeps@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/server/server_job.py
7a61d2f7b1c221ddd30b60e9b8d90d3052fc60e4 23-May-2014 Gwendal Grignou <gwendal@chromium.org> Add suspend method.

Add method to be able to suspend machines from server side
without calling a client test: this way, we can suspend for hours.

Remove dummy_Suspend.

TEST=Run hardware_StorageStress/control.suspend
Run hardware_StorageStress/control.quick
Run kernel_MemoryRamoop/control

BUG=chromium:376881

Change-Id: Ic7e6624485e4473a90d575ed53ea89bb164724e0
Reviewed-on: https://chromium-review.googlesource.com/201385
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
/external/autotest/server/server_job.py
04be2bd5e4666a5c253e9c30ab20555e04286032 08-May-2014 Ilja H. Friedel <ihf@chromium.org> Autotest: Change logging.warn() to logging.warning().

logging.warn() is deprecated. See
http://bugs.python.org/issue13235

Substitution was performed via
~/cros/src/third_party/autotest/files$ find ./ -type f | xargs sed -i 's/logging.warn(/logging.warning(/'

BUG=None.
TEST=There should be one-- and preferably only one --obvious way to do it.

Change-Id: Ie5665743121a49f7fbd5d1f47896a7c65e87e489
Reviewed-on: https://chromium-review.googlesource.com/198793
Commit-Queue: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
/external/autotest/server/server_job.py
686fca8c8dd655f00766c37e5a1c5177c0bff126 24-Apr-2014 Alex Miller <milleral@chromium.org> [autotest] Set job_labels to the job labels when calling run().

Otherwise we don't actually provision anything.

BUG=chromium:366331
TEST=machines now provision

Change-Id: I008fe79d8b596ea9f83a4eafce9fc164d3513eb9
Reviewed-on: https://chromium-review.googlesource.com/196689
Reviewed-by: Prashanth B <beeps@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
/external/autotest/server/server_job.py
ca76bcccd6b8029bb0c3fcf72b1c4649e7fad9b1 19-Apr-2014 Alex Miller <milleral@chromium.org> [autotest] Pass --job-labels to cleanup.

Cleanup runs through a completely different flow from the rest of the
special tasks, so I missed it when threading things through the first
time...

BUG=chromium:334418
TEST=Logged job_labels from cleanup, saw labels

Change-Id: Ia7f78e6e3099f3d0ebddb777fc52e1f0cec984be
Reviewed-on: https://chromium-review.googlesource.com/195710
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/server/server_job.py
667b5f2b48c6096f944a34ca53e769c1031be45f 01-Mar-2014 Alex Miller <milleral@chromium.org> [autotest] Special task control segments take label-dependant actions

Autoserv accepts the labels of a job via the --job-labels argument, and
feeds them into the control segment by injecting the variable
`job_labels` into the global namespace.

cleanup/verify/repair/reset now use the same sort of loop that provision
does to look up additional tests to run that depend on the labels passed
into the control segment.

Note that some care has to be taken here, as we're moving the labels
from --provision to --job-labels, and I'd rather remove a bit of
migration code later than make for a complicated deploy.

BUG=chromium:334418
TEST=special tasks still run fine

Change-Id: I1596b49905f1500e8ce01e81d9aab2a6c7db111f
Reviewed-on: https://chromium-review.googlesource.com/188454
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/server/server_job.py
d0672689266d3d63901f3a35fb7e0a2d96d6e39a 17-Sep-2013 beeps <beeps@chromium.org> [Autotest] Add default host parameters to host factory.

There are times when we would like to create a host outside the context of
a server job. One such scenario is with test_that, where we would like to ssh
into a DUT and determine its board if one wasn't specified. Today this is
impossible without hacking in the values of ssh_user, ssh_pass etc, directly
into the factory, or incurring the overhead of an extra test run that will
drop the board into a keyval.

This cl uses the same default arguments the server_job uses if ssh_user, ssh_pass
etc are not specifiec thus enabling us to create hosts on-the-fly.

TEST=Created hosts, used them to get board from test_that. Ran run_suite
with a dummy suite to confirm that server_job can still create hosts.
BUG=chromium:265705

Change-Id: I50811eb8b0e6b145a190211391c2409913bc8a33
Reviewed-on: https://chromium-review.googlesource.com/169727
Commit-Queue: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
/external/autotest/server/server_job.py
c5947faa755945f81537c6c33c322dccacac0ade 04-Sep-2013 Aviv Keshet <akeshet@chromium.org> [autotest] add a --ssh_options option to autoserv

This CL follows the template of
https://chromium-review.googlesource.com/167415

BUG=chromium:285378
TEST=Unit tests pass. Manually verified that specifying
--ssh_options="-F /dev/null -i /dev/null" caused those flags to be
threaded into ssh commands.

Change-Id: Ie0496862d05d42192d55501fc0ed1c3a6274fe79
Reviewed-on: https://chromium-review.googlesource.com/168099
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
/external/autotest/server/server_job.py
d1c2b73b7a1cbc74701ddc2b6bbbb3a162ace047 20-Aug-2013 Fang Deng <fdeng@chromium.org> [autotest] Make ssh verbosity flag as an argument of SiteHost

We are appending ssh verbosity option to site_host.GLOBAL_SSH_COMMAND_OPTIONS
in autoserv. This was a hacky workaround because make_ssh_command
didn't take a host object as an argument when the code was written.

make_ssh_command has recently been refactored as a method in SiteHost. Now we
can pass ssh verbosity option as an arg to the _initialize method of
SiteHost and remove the hacky global variable.

The verbosity option is threaded through autoserv, server_job, hosts.factory
to SiteHost as what we do for passing ssh_user/ssh_pass.

BUG=chromium:276628
TEST=Run test_that with --ssh_verbosity 1, confirmed detailed debugging
info in output; Verify/Repair/Reset jobs work; Dummy tests work.

Change-Id: Ic51a65c16e061a4d5eb940da6fdfec8c40b51d98
Reviewed-on: https://chromium-review.googlesource.com/167415
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
/external/autotest/server/server_job.py
b03ea9d5209ff5096556d6dc85b9a2cc1c38e417 16-Aug-2013 Dan Shi <dshi@chromium.org> [autotest] Force to collect /var/log if test is failed with device error.

When test running in DUT is aborted and does not get a chance to run post test
hooks, diff of /var/log can not be copied to resuts folder and autoserv will
not be able to collect any log from the DUT.

This CL saves the device error failure flag to job.failed_with_device_error.
Autoserv uses this flag to determine whether to collect crash info (through
server/control_segments/crashinfo), which will collect all files in /var/log.

BUG=chromium:271703
TEST=run autoserv in local setup. Manually reboot DUT during the middle of a
test, then confirm the results collected has content in crashinfo.[DUT name].

Change-Id: I1a3757b8933fe60deea75728e867033eeb86c7cd
Reviewed-on: https://gerrit.chromium.org/gerrit/66013
Commit-Queue: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/server/server_job.py
45554f34c287f48b3d8f4911a8ad77be5e4074e3 14-Aug-2013 Alex Miller <milleral@chromium.org> [autotest] Add logging surrounding PIDs.

The scheduler thinks autoserv instances are dieing before they really
are, so here's some logging surrounding this to try and help figure
things out.

BUG=chromium:262005
DEPLOY=scheduler
TEST=Only logging.

Change-Id: I3322fa24a564f817bc13bac076320a374bbc2af2
Reviewed-on: https://gerrit.chromium.org/gerrit/65781
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/server/server_job.py
8a91f23cf8a705946a71220dc0c6f06e0987b74a 09-Jul-2013 Christopher Wiley <wiley@chromium.org> autotest: Add flag to autoserv to disable sysinfo step

This saves us time when we don't care about this step.

BUG=chromium:258507
TEST=Ran autoserv directly with --disable_sysinfo and observed
appropriate messages omited/emited.

Change-Id: I57af12a2216a87ecb2c5719591eb1d2497731404
Reviewed-on: https://gerrit.chromium.org/gerrit/61299
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/server_job.py
07e09aff0baf871b33e5479e337e5e3e0523b729 12-Apr-2013 Dan Shi <dshi@chromium.org> [Autotest] merge cleanup and verify

The objective of this CL is to merge cleanup and verify into a single job to
reduce run time of each test. In existing design, by default, a cleanup job is
scheduled after a test is finished, and a verify job is scheduled before a
test is started. By merging these two jobs together, we are seeing the total
run time of these two jobs is reduced from about 47s to 37s, around 10s saving.
That does not include the saving on scheduler to schedule two jobs, which may
take another 5-10s.

The design is to create a new special task, reset, which runs at the beginning
of a job by default. Verify task is changed to not to run by default before a
job starts. Cleanup job will only be run if a job is scheduled to reboot and
any test failed in that job.

BUG=chromium:220679
TEST=tested with run_suite in local machine
DEPLOY=afe,apache,scheduler,change all users' preference on reboot_after to
Never, sql: |update chromeos_autotest_db.afe_users set reboot_after=0|

Change-Id: Ia38baf6b73897b7e09fdf635eadedc752b5eba2f
Reviewed-on: https://gerrit.chromium.org/gerrit/48685
Commit-Queue: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/server/server_job.py
f594c5ee0a769d00b0f0e8a6ebe1c6e19cf53417 04-Jul-2013 Christopher Wiley <wiley@chromium.org> autotest: Allow crash collection to be skipped

Expose this functionality as a flag that defaults to collection crashes
as normal. This makes test runs faster for developers iterating a
test/patch.

BUG=chromium:250366
TEST=Ran a test, observed that collection was skipped.

Change-Id: I61d76ef3618a6bc7e3228fa7ee8bf32dafaec53d
Reviewed-on: https://gerrit.chromium.org/gerrit/60953
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/server_job.py
cb6f1e2209ae6ea09c78317b114db6e51f6e255b 29-Jun-2013 beeps <beeps@chromium.org> [autotest] Teach autoserv to check a hosts job_repo_url.

Autosev now understands a verify_job_repo_url flag to
mean 'execute a control segment to verify said hosts
contain a valid job_repo_url'. It does this by re-staging
autotest packages at the job_repo_url; If the devserver
embedded in the job_repo_url is unresponsive we get another
devserver, stage autotest on it, and update the job_repo_url.
If the job_repo_url is None we leave it, on the assumption
that the host will go through a re-image before it runs
any tests, which will give it a new job_repo_url.

Pros:
1. If we are unable to stage autotest packages at
job_repo_url the test will fail, soon and fast.
2. Since we perform these actions in the server_job itself
we won't see package installation exceptions later on,
which are just misleading today since we end up
rsyncing client autotest anyway.

Cons:
1. The re-image job will actually try staging the contents
of an autotest build it will surely not need. Something
along these lines is unavoidable in most clean solutions,
though.

TEST=
1. Ran smoke suite, deleted autotest packages on devserver
just before security_Minijail, made sure it passed.
Also deleted the entire build directory.
2. Ran a suite with a bad devserver in the job_repo_url
and confirmed we resolve to a good one, restage
autotest and reset the job_repo_url.
3. Ran a suite after recovery (job_repo_url=None).
4. Invoked autoserv with a list of machines.
5. Checked that cleanup, verify, repair don't get the
verify_job_repo_url flag, and hence, don't re-stage.
Cleanup still passes because it rsyncs client
autotest in the invalid job_repo_url case.
6. Server job fails before running tests if devservers
are down or we're unable to change job_repo_url.
7. BVTs pass

BUG=chromium:255114

Change-Id: I3c5f445962707a0a089f9d755aed4c4d0fdbd8f2
Reviewed-on: https://gerrit.chromium.org/gerrit/60578
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>
/external/autotest/server/server_job.py
cb79ba7249e62ab26662362908a747fe8b153d93 29-May-2013 Alex Miller <milleral@chromium.org> [autotest] Add provisioning flag to autoserv.

autoserv now accepts a --provision flag that accepts a comma seperated
list of labels that it should provision the targeted machine(s) (via -m)
to. This list gets fed directly into the control segment, which handles
all of the processing of it and provisioning work.

It should also be loudly noted that since we run the provision control
segment as a normal test instead of directly executing the contents, one
cannot specify the -c flag, or else it will try to run the provision
control segment as a client-side test.

This is just some plumbing. It's pretty uneventful.

BUG=chromium:249437
TEST=The following:
1) Ran autoserv --provision cros-version:lumpy-release/R28-3993.0.0 and
the machine was provisioned correctly.
2) Ran autoserv -c --provision and received an error.

Change-Id: I03582a5210d182f171ef725c4e49cc83c1baf793
Reviewed-on: https://gerrit.chromium.org/gerrit/58384
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/server/server_job.py
91493c88a1506729a6728660d90cfae591cd52aa 25-Jan-2013 Scott Zawalski <scottz@google.com> Introduce a mechanism for retrying tests at the control file level.

If a test returns unsuccessfully and --retry-test > 0 is specified the test
will be rerun. Options were added to autoserv and are passed through to the
client side job by modifying the base_job.

Tests that fail and then succeed within the --retry-test limits will have a
test keyval set with the number of attempts |test_retries_before_success|.

--retry-test can be utilized immediately in run_remote_test but will need to
be piped through the RPC system and down to the scheduler to provide the proper
--retry-test value from the scheduler's perspective.

Fixed random pylint errors consisting mostly of unused imports.

TEST=unittests
created a randomly failing client and server side test and ran it on devices
BUG=chromium-os:37158

Change-Id: Ibec3935b5f6fd28fc1b6eb7be55de27a571ad777
Reviewed-on: https://gerrit.chromium.org/gerrit/42043
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/server/server_job.py
f4d43ff1254ac68ebc54442da8ad2821bd16d6cb 30-Oct-2012 Chris Sosa <sosa@chromium.org> Reland "Change cleanup phase to only restart the UI instead of rebooting the machine."

This reverts commit 9479fcddc9a8578c91c844cba13243f0a4e09cbd.

Now that we've converted platform_Shutdown to a server-side test, we can safetly commit
this change.

Previously reviewed in: I07525959ea3cb76b1c0ec413b9a968660e92f832

BUG=chromium-os:34489
TEST=Ran the cleanup phase directly with autoserv with argument
server/control_segments/cleanup. I also started up a local autotest
server and ran a Job which ran through client cleanup phases.

Change-Id: I1892a2e7a9fd012461342771fe554e8f5ea59532
Reviewed-on: https://gerrit.chromium.org/gerrit/36922
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
/external/autotest/server/server_job.py
9479fcddc9a8578c91c844cba13243f0a4e09cbd 09-Oct-2012 Chris Sosa <sosa@chromium.org> Revert "Change cleanup phase to only restart the UI instead of rebooting the machine."

There is an issue where platform_Shutdown has a dependency on reboots in cleanup.
Once that is fixed we can reland this commit.

This reverts commit 76552a34a8355cfaa14bb8906f232a57b9df0cc3.

BUG=chromium-os:35150
TEST=instanceof(revert) == True

Change-Id: I1e311bdb7f91df539e90524bb8f79a69fce58c3b
Reviewed-on: https://gerrit.chromium.org/gerrit/35042
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
/external/autotest/server/server_job.py
76552a34a8355cfaa14bb8906f232a57b9df0cc3 08-Oct-2012 Chris Sosa <sosa@chromium.org> Reland "Change cleanup phase to only restart the UI instead of rebooting the machine."

This is the same as the original but with one modification -- In server_job,
I've changed when we wipe _uncollected_logs.

Why do I need to do this? The way that the Autotest server runs a cleanup job
is as a Server Job with an empty control file but with cleanup=True. This means
that cleanup runs outside of the regular results dir lifetime of a server job.

Original review in: Ibf33136b14cc29f0c86d4428e09572daaedb8cbe

BUG=chromium-os:34489
TEST=Ran the cleanup phase directly with autoserv with argument
server/control_segments/cleanup. I also started up a local autotest
server and ran a Job which ran through client cleanup phases.

Change-Id: I07525959ea3cb76b1c0ec413b9a968660e92f832
Reviewed-on: https://gerrit.chromium.org/gerrit/34935
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
/external/autotest/server/server_job.py
7a875769875c5275c56c27489526de8532e08eb2 13-Jun-2012 Peter Mayo <petermayo@chromium.org> Keep the job label around for the test.

No idea if this is net good. Mostly tests should be insensitive to
what they're called. Storing logs, reporting results, seem to be
acceptable uses, but they are hard to codify strictly.

BUG=None
TEST=None

Change-Id: I6aee8b61caa286c8a944ccb19e524a931754df5c
Reviewed-on: https://gerrit.chromium.org/gerrit/25226
Commit-Ready: Peter Mayo <petermayo@chromium.org>
Tested-by: Peter Mayo <petermayo@chromium.org>
Reviewed-by: Peter Mayo <petermayo@chromium.org>
/external/autotest/server/server_job.py
456d3c115952bf1ae984770e226c5a50676b31c0 19-Jul-2011 Dale Curtis <dalecurtis@chromium.org> Upstream Autotest merge.

Merged from d9d64b855363d214996b187380532d4cc9991d29.

BUG=none
TEST=emerge autotest-tests, local server, run_remote_tests.

Change-Id: Id8cf1ef930bc0cd80347d77f2de65561be2a12a4
Reviewed-on: http://gerrit.chromium.org/gerrit/4664
Reviewed-by: Mike Truty <truty@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Dale Curtis <dalecurtis@chromium.org>
/external/autotest/server/server_job.py
5759356e23bca743f83a866b184cf4a4359de236 15-Jun-2011 Paul Pendlebury <pauldean@chromium.org> Move distribute_across_machines and gtest to site extension.

(Patch 11: Simplify how site_server_job.run() inserts gtest_runner
into the namespace parameter of server_job.run().)

(Patch 10: Update gtest_parser to warn and gracefully exit if the test
log file does not exist. This happens in a gtest suite
throws a test exception before completing and copying the
test log file back to the server.

Also updated FailureDescription() to not return the name of
the test to simplify checking for failure lines. This
makes "if failures: then use failures" work instead of
"if len(failures) >1: then use failures[1:]")

(Patch 9: Code review fixes, clearer comments and one line argument
parsing.)

(Patch 8: Fix PyAuto parse failure with no error lines.)

To make keeping in step with upstream Autotest moving the
distribute_across_machines and gtest_runner into site extensions.

Clean up the old include, exclude, action test attributes from the old
(test_name, {args}, [include], [exclude], [action]) to a cleaner form
of (test_name, {args}, {attributes} where the attributes dictionary
is keyed to include, exclude, and attributes for the same behavior as
before in a nicer format.

Updated BVT and Regressions to use the new format.

Server_Job:
Removed unused imports I added for removed functions.
Move site functions to end of file to enable importing
base_server_job.
Removed distribute_across_machines() and record_skipped_test().
Removed gtest_runner from the default namespace.

Site_Server_Job:
Added imports and functions removed from server_job.
Changed distribute_across_machines from using threads that
launched subprocesses to just using subprocesses.

Site_Server_Job_Utils:
Fixed test attributes to use a dictionary instead of 3 lists.
Enabled running server jobs in addition to client jobs.
Removed base thread class from machine_worker since the instances
are run by subcommands now.

logging_KernelCrashServer
http://pauldean.kir/afe/#tab_id=view_job&object_id=327

BVT
http://pauldean.kir/afe/#tab_id=view_job&object_id=328

Regression
http://pauldean.kir/afe/#tab_id=view_job&object_id=330

BUG=None.
TEST=Local Runs.

Change-Id: I118ae8bdc2b49d4190051d59a748ecb01d0da33c
Reviewed-on: http://gerrit.chromium.org/gerrit/2698
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Tested-by: Paul Pendlebury <pauldean@chromium.org>
/external/autotest/server/server_job.py
74a314b490ff542c4dd2ae4aa0d11c6394d92960 23-Jun-2011 Dale Curtis <dalecurtis@chromium.org> Upstream Autotest merge.

As titled, a merge up to 93fc426ca133e775eb495f34d138fc57d92fb55e.

- Removes a bunch of deprecated code.
- Moves several private utilities into the private repo.
- Couple changes ported upstream and resynced.

BUG=None
TEST=In progress... will spin up new Autotest server and use
run_remote_tests for bvt, regression, smoke.

Change-Id: Id3e2ad529bb7b05f148e5d98aea46bb9ea828200
Reviewed-on: http://gerrit.chromium.org/gerrit/3350
Tested-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
/external/autotest/server/server_job.py
92a90747631512b36248722273890d49103ec9fc 25-May-2011 Paul Pendlebury <pauldean@chromium.org> Fix run_remote_tests erroneous error report on bvt runs.

The problem was that when generate_test_report encounters a status.log file it
expects a result to have both the strings "GOOD" and "completed successfully".
One of the BVT tests was forcing the client to reboot before running which put
a reboot START...END sequence in the root status.log file, but the reboot
message does not include "completed successfully". Without this entry the file
would have been empty and the result would have been a bvt suite pass.

The fix is to include the "completed successfully" message on reboot logs.

Also: Adding better error handling around tests that throw exceptions when running.
- Making a reboot happen on requested even when an exception happens.
- Reporting if the exception was derived from AutotestError or AutoservError.

run_remote_tests.sh --remote 172.31.30.244 bvt

INFO : Test results:
---------------------------------------------------------------------
suites.bvt PASS
suites.bvt/172.31.30.244 PASS
suites.bvt/172.31.30.244/build_RootFilesystemSize PASS
bytes_rootfs_prod 657637376.0
bytes_rootfs_test 657731584.0
suites.bvt/172.31.30.244/desktopui_ChromeFirstRender PASS
seconds_chrome_first_tab 1.49
suites.bvt/172.31.30.244/desktopui_FlashSanityCheck PASS
suites.bvt/172.31.30.244/desktopui_KillRestart.chrome PASS
suites.bvt/172.31.30.244/desktopui_KillRestart.session PASS
suites.bvt/172.31.30.244/desktopui_WindowManagerFocusNewWindows PASS
suites.bvt/172.31.30.244/graphics_WindowManagerGraphicsCapture PASS
suites.bvt/172.31.30.244/logging_CrashSender PASS
suites.bvt/172.31.30.244/logging_UserCrash PASS
suites.bvt/172.31.30.244/login_BadAuthentication PASS
suites.bvt/172.31.30.244/login_CryptohomeIncognitoMounted PASS
suites.bvt/172.31.30.244/login_CryptohomeIncognitoUnmounted PASS
suites.bvt/172.31.30.244/login_CryptohomeMounted PASS
suites.bvt/172.31.30.244/login_CryptohomeUnmounted PASS
suites.bvt/172.31.30.244/login_LoginSuccess.apps PASS
suites.bvt/172.31.30.244/login_LoginSuccess.default PASS
suites.bvt/172.31.30.244/login_OwnershipApi PASS
suites.bvt/172.31.30.244/login_RemoteLogin PASS
suites.bvt/172.31.30.244/network_DisableInterface.wifi_only PASS
suites.bvt/172.31.30.244/network_Ping PASS
suites.bvt/172.31.30.244/platform_AccurateTime PASS
seconds_offset 0.0
suites.bvt/172.31.30.244/platform_FilePerms PASS
suites.bvt/172.31.30.244/platform_HighResTimers PASS
suites.bvt/172.31.30.244/platform_KernelVersion PASS
suites.bvt/172.31.30.244/platform_OSLimits PASS
suites.bvt/172.31.30.244/platform_PartitionCheck PASS
suites.bvt/172.31.30.244/platform_Shutdown PASS
seconds_shutdown 0.26
sectors_read_shutdown 600.0
sectors_written_shutdown 8.0
suites.bvt/172.31.30.244/platform_ToolchainOptions PASS
suites.bvt/172.31.30.244/power_Resume PASS
num_retry_attempts 0
seconds_system_resume 2.68691396713
seconds_system_resume_firmware 0.455371967133
seconds_system_resume_kernel 2.231542
seconds_system_resume_kernel_cpu 0.257167
seconds_system_resume_kernel_dev 1.170656
seconds_system_suspend 0.358575
---------------------------------------------------------------------
Total PASS: 31/31 (100%)

BUG=None.
TEST=run_remote_tests.sh --remote 172.31.30.244 bvt, & running control.bvt on lab machines using autotest.

Change-Id: Ia61c6304707d04a597edf2cd64c4fbec10ede956
Reviewed-on: http://gerrit.chromium.org/gerrit/1552
Reviewed-by: Eric Li <ericli@chromium.org>
Reviewed-by: Paul Pendlebury <pauldean@chromium.org>
Tested-by: Paul Pendlebury <pauldean@chromium.org>
/external/autotest/server/server_job.py
7c1fdcfa00048155cce198cbedf776fcef0d9d38 04-May-2011 Paul Pendlebury <pauldean@chromium.org> Adding parser to report desktopui/gtest individual test status.

Added a new method to server_job to run gtests.

Added two new classes to server_job_utils to run and parse gtests.

Added three new suites to hold individual gtest suites that were in one browertest suite.

http://pauldean.kir/afe/#tab_id=view_job&object_id=259
http://pauldean.kir/afe/#tab_id=view_job&object_id=260
http://pauldean.kir/afe/#tab_id=view_job&object_id=261

BUG=None.
TEST=Lots of runs on local and lab machines.

Change-Id: I6c02c40d7889ade5342ccdd99da7f5d15a9f50d8

Fixes from code review.

Added gtest_runner.py to hold runner/parser for gtests.

Added host_attributes.get_attributes() method.

Updated documentation.

BUG=None.
TEST=Runs on lab machines.

Change-Id: Id591da132037bbc277c4dcb2353cbc2a61103444

Code review updates.

Removing server_job.run_gtest_tests() and making gtest_runner available in the environment of the control files.

Adding test_item.run_tests() to make it easer to execute tests from different classes.

Adding actions to test tuple to support reboot before/after running tests.

Removing uneeded methods on host_attributes class.

Reworking documentation in site_host_attributes to fix pylint errors.

Changing control files from job.run_gtest_tests() to gtest_runner.run()

Change-Id: I9f36f1176b24226ee83826cf84e5125c8af87b76

BUG=None.
TEST=Lots of runs on local and lab machines.

Change-Id: If8696119bcd391de1adc88cc95d55fdb74cf2129
Reviewed-on: http://gerrit.chromium.org/gerrit/343
Reviewed-by: Eric Li <ericli@chromium.org>
Tested-by: Eric Li <ericli@chromium.org>
/external/autotest/server/server_job.py
e4afc774b10a6fc45033fedc50d8adc335656a36 26-Apr-2011 Paul Pendlebury <pauldean@google.com> Reduce load on autotest by cutting number of forks and parsers.

Forking is still required to keep logging and parsing working. By using a multiprocessing queue instead of a normal queue ServerJob can fork once per test host instead of once per test.

Also make continuous parsing an opt in request instead of a default feature. Continuous parsing adds a parser per host, and with many concurrent hosts in concurrent tests for concurrent builds this load adds up. BVT runs take a few minutes and don’t need an instantaneous update in the front end. But longer running suites will still benefit from being able to give status updates as they run.

Change-Id: I03c898d7aff4eaae44d55c5106f789fc16326783

BUG=None.
TEST=Multi-Machine BVT with and without continuous parsing.

Review URL: http://codereview.chromium.org/6902033
/external/autotest/server/server_job.py
1f6f3e763a4aeecaa6cf2444e6ce7ea700d970c9 13-Apr-2011 Paul Pendlebury <pauldean@google.com> Enable continuous parsing and add host names to global autoserv.DEBUG entries.

Enabled continuous parsing by passing the server_job object to each machine_worker and then starting a parser on each test execution.

Added the host name to log entries by specifying the host subdirectory on subcommand initialization.

Change-Id: I121d97e0e7e5aa26a1e5f6274797e7e6f1029c16

BUG=None.
TEST=Running tests suites using distribute_across_machines().

Review URL: http://codereview.chromium.org/6837027
/external/autotest/server/server_job.py
f807c18961a620760c3095b90139a9352afc8d0f 05-Apr-2011 Paul Pendlebury <pauldean@google.com> Preparing to upstream: Created host_attributes and server_job_utils files.

Created a host_attributes file which by default doesn't do much on its own, but uses site_host_attributes when present to define attributes. The existing HostAttributes class did not change so no existing use should regress.

Created a server_job_utils file to hold the helper classes test_item and machine_worker. These classes are used by distribute_across_machines to manage tests and machines.

Change-Id: I4a5795bc7e6e865f616e4becf1e0781c1f51fe2b

BUG=none.
TEST=Run BVT with parallel_on_machines and distribute_across_machines on lab machines.

Review URL: http://codereview.chromium.org/6677157
/external/autotest/server/server_job.py
ff1076ddfa09ddd614b83daaf447730b1d33a92f 31-Mar-2011 Paul Pendlebury <pauldean@google.com> Enable test distribution/parallel execution from within Autotest ServerJob.

This change adds a new method to base_server_job, distribute_across_machines(). Distribute_across_machines is different from parallel_on_machines in that parallel_on_machines runs each test given on each host machine provided. Instead distribute_across_machines runs each test given once using the host machines given. The total work done by parallel_on_machines is len(Tests * Machines) where distribute_across_machines does len(Tests) work.

Two utility classes are also added to server_job.py. machine_worker and test_item.

machine_worker is thread that manages tests executing on one remote host. It manages finding a test, executing that test on the remote host using autotest, and logging everything in a way tko parser understands.

test_item is a small class that extends the basic test tuple enabling quick test verification. If a test has include or exclude attributes the test_item.validate method checks if the candidate meets the requirements to run the test.

Cumbersome code in the existing control files can be eliminated with this change. Instead of using a growing tree of attribute checks, (getHostAttributes, if attribute.A, if not attribute.B and attribte.C..., runtest), the tuples in the Test list now support include and exclude attributes. For example ('testSomething', {args1:2}, ['includeAttribte', 'anotherAttribute], ['excludeAttribute'])

The existing code path will continue to work after this check-in. To use the new behavior a control file must opt-in by changing the call from job.parallel_on_machines to job.distribut_across_machines.

More details are in the comments around the code changes.

BUG=none

TEST=Lots of manual testing of strange control files and test conditions, and:

Check existing behavior or ServerJob:
Run unchanged control.bvt:
Against machines on my desk.
Against 6 ST8's in the lab.
With RunRemoteTests from chroot against machines on my desk.

Check new distribute behavior of ServerJob:
Run modified control.bvt with include and exclude attributes:
Against machines on my desk.
Against 6 ST8's in the lab.
With RunRemoteTests from chroot against machines on my desk.

Checked image update jobs work with distributed code flow.

Change-Id: Ia62534127382828bf0d1decf83e36ffc4f292c39

Review URL: http://codereview.chromium.org/6749004
/external/autotest/server/server_job.py
861b2d54aec24228cdb3895dbc40062cb40cb2ad 04-Feb-2011 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into master

Merged to upstream autotest @4749~@5215.

The entire change list description is too big to enlist here. Please refer to upstream (http://autotest.kernel.org/browser) for more details.

BUG=
TEST=emerged both x86 and arm build.
Tested emerged x86 build bvt against a chromeos device.

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

Change-Id: I8455f2135c87c321c6efc232e2869dc8f675395e
/external/autotest/server/server_job.py
bdaab795cffa33f9a37995bb283047cb03699272 07-Jan-2011 Kenneth Waters <kwaters@chromium.org> Revert "Merge remote branch 'cros/upstream' into autotest-rebase"

This reverts commit 7edb30498d75a29a3287fe07070f2b51a116c5d4.

TEST=Built for tegra2_seaboard
BUG=10756

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

Change-Id: Ifcd1a2279f5a62b99552a8f961c1430889a3a928
/external/autotest/server/server_job.py
7edb30498d75a29a3287fe07070f2b51a116c5d4 07-Jan-2011 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into autotest-rebase

Merged to upstream trunk@5066, from trunk@4749.

There is no way I could enlist each individual CL from the upstream here since it will blow up the changelist description field.

BUG=
TEST=
Had patched this CL into a fresh cut client to avoid any side effect.
run_remote_test bvt from both emerged location and third_party/autotest/file.

Both test passed!

We should also keep any eye on this to see how it gets propagated into cautotest server.
TBR=dalecurtis

Change-Id: I72f2bc7a9de530178484aea1bfb5ace68bcad029
/external/autotest/server/server_job.py
10222b88ac057e9abc5df421d830bdd978e68562 24-Nov-2010 Eric Li <ericli@chromium.org> The original CL 5188004 only takes care of client side tests and missed the opportunities to support server side control file, since there are lots of occurrence of hosts.create_host(hostname) call inside the server control file.

I had to find a better way to pass ssh-options into hosts.create_host() function.

Reported by Thieu Le.

Change-Id: Ia48793fd73fec1b032a4e3fc1d8505d31431087a

BUG=9321
TEST=run client/server side sleeptest against a remote VM.

Review URL: http://codereview.chromium.org/5102010
/external/autotest/server/server_job.py
6f27d4f22a1ba5063968b8c322fa0845f3279ade 29-Sep-2010 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into tempbranch3

Merge to trunk@4817

BUG=
TEST=

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

Change-Id: I83376bc7d28104ec2678e157eadbe7df7c05c0e0
/external/autotest/server/server_job.py
517d95a1ef4edb04da427763f86068a447d45ec7 29-Sep-2010 Benson Leung <bleung@chromium.org> Revert "Merge remote branch 'cros/upstream' into tempbranch2"

This reverts commit 25fc6d1f28e54c46689f12d3b93c2540ef45323a.

TBR=ericli@chromium.org

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

Change-Id: Ib0165b19bfdf02264f8a6a74ddf3ae74c8c0f7df
/external/autotest/server/server_job.py
25fc6d1f28e54c46689f12d3b93c2540ef45323a 29-Sep-2010 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into tempbranch2

Merged to trunk@4816.

BUG=
TEST=we will build a new autotest server instance, and keep cautotest running and then later do a cname switch.

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

Change-Id: Iee5f52f45f28f84927d6c6f9a74edc370d40288a
/external/autotest/server/server_job.py
e29d0e442c8eefe07dfb2533e1a1dafc14b69e0b 17-Jun-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Put the continuous parsing hooks into the refactored job.record code.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4632 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
52053636199c9dca7cd7a4df4d8913c866dff507 11-Jun-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Restores proper support for handling unexpected client terminations
after the server_job.record refactoring.

The original record implementation just dumped whatever status logs
the client sent it into the status.log, so if the client died on you
there was never a problem with the client leaving the server-side
logging in a funky state. Now that client job records are being
properly routed though the server-side job.record a client death can
leave the server logging in a broken state.

This implementation adds a special get_record_context method which can
be used by the autotest.py code to retrieve the current job.record
context at the start of the client job, and then restore it at the end
so that the server side logging is put back into a known-good state.

It also removes a bunch of self._record_prefix uses in the server_job
code which were rendered useless by the job.record changes, but
weren't removed.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4606 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
2a89dac0b6e319ef58d41c7a591c3d88cf6dd8a1 11-Jun-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Refactor the server_job code to use the base_job implementation of
record.

The two main features that the server job code added on top of the
basic job record were the ability to inject client job records into
the server job record, and the ability to inject console/vlm warnings
into the record.

The Autotest injection was implemented by adding a parse classmethod
to the status_log_entry class that does the inverse of the render
method, so that the Autotest class can construct status_log_entries
from the raw text status logs it gets from the client. The server then
re-records the messages, rather than using a low-level method to
bypass the old job.record rendering.

The warning injection was implemented by using the record_hook; to
make it work better it was moved to be called before the entry is
logged, not after. This required a slightly more involved hook, as it
was useful to be able to call job.record directly from the hook and so
the hook was wrapped in a callable class that prevents recursion.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4605 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0a88370f238341e1a4061b1306e34c7f1c3335b3 21-Apr-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add the ability to clear out known hosts file for a specific host, and
for all hosts in a job.

This is useful when we reinstall the machine to reduce the "REMOTE HOST
IDENTIFICATION HAS CHANGED" spam warnings.

Signed-off-by: Girts Folkmanis <girts@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4435 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
b6e7bdbc1fdb2333fa9f51e1dd3afc83ee68f270 13-Apr-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> When client state files can't be retrieved after a job the code shouldn't fail. The os.remove call is already in a proper try-except that deals with the fact that the file may be missing, the read_from_file call can be moved into the same block.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4407 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
808f4b1663600ba7e735c4d78125825c52bb804f 10-Apr-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Expose args as a proper job property, fix up some unit tests. In the
future I'm just going to start reverting patches that break tests.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4396 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
648c39fc8638799582ab76a9faa23bb38d385908 19-Mar-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> server_job.run should only remove the uncollected_logs file if it created it. The method may be used recursively, so the call that creates it is the one responsible for removing it.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4313 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
e0cbc912c81acfb8844510267b2cefd64d9ae478 11-Mar-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add support to autoserv for a --control-filename parameter, to allow users to
control where in the results directory autoserv will store the server control
file.

This also changes the archving stage in the scheduler to make use of this
argument, so that the control file from the archving stage is written to
control.archive and does not overwrite the control.srv from the job itself.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4294 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
a2c994965280e84061c5e0502b711947f780bb02 27-Jan-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Change the job.postprocess_job_state to catch OSError and not IOError, since
OSError is what os.remove throws when the file does not exist.

It also cleans up some more of the backing file locking for job_state, so
that the read and write code in server_job is compliant as well. The main

difference is that while read_from_file does not provide generally safe
locking and synching behaviour, it does do so for its final synchronization.
This makes it easier for non-job_state code to be safe, since it only needs
to lock the file it passes in.

It also moves the locking decorator out of the class, to make it easier to
use on the fly. It also separates out the with-lock and with-sync code.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4173 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
cc92936b577707a0c1314d1140b66518d2b7feef 25-Jan-2010 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Basic support for "summary results" -- articifial test results that are explicitly recorded by a server-side control file or code that it calls. This CL just adds the record_summary() method to the server_job object. It lacks any special parser support or TKO DB changes, those will come later.

This also includes a couple of minor changes to support conitnuous parsing and final reparsing for hostless jobs. Since hostless jobs are a common intended use case for summary results, they'll need full parsing support to be useful.

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4161 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
12b45582c04b2417036a6f11afc843ac5fddea50 11-Jan-2010 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Massive permission fix

Fix permissions for all the development tree

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4094 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
fc3da5bbdcd63840cd224282812c050c5520db11 06-Jan-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> More refactoring of the job state code to try and reduce duplication.
In the process this also refactors a bunch of job.run_test duplication,
specifically the handling of job tags (there's still lots more
duplicate code left).

The main state refactorings are:
* Storing client job steps in __steps and special-casing its removal
in autotest.py is gone. Instead the client job code stores it
directly in the client.steps state, and the autotest.py generically
removes the entire client.* namespace.
* Moving this out of the publicly-visible state and into a private
namespace allows us to drop has_state and discard_state, which
were really only needed so that we could make sure __steps was
not persisted across jobs.
* All of this client-job state managment was moved out of autotest.py
and into server_job.py. All the data this code was getting and
setting was in the job object, so it seemed like a better place
to put it. This also let us drop load_state and save_state, which
were really only there to make it easier to push and pull data
out of the server job object.
* Eliminate get_run_number and set_run_number in favour of a generic
use_sequence_number boolean property (that works on both client
and server automatically). The get_ and set_ code was only being
used to enable and disable an auto-incrementing sequence number to
be tagged to each test run, so we can just make the public
interface a boolean and handle the sequencing under the covers.
* Drop all the test_tag and test_tag_prefix code in favour of a
persistent automatic_test_tag property. Also drops the
show_kernel_in_test_tag flag in favour of just implementing this
in the control file generator using automatic_test_tag.
* Refactor all the test name tagging code into base_job, unifying
the tagging portion of the job.run_test code.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4075 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0cb250f5c5442491594c0dea2d371103281f9ef2 05-Jan-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Style fix. The itertools import shouldn't be on a separate line.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4071 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
4608b005f15444d2ec4601b8274828ad52b5ea51 05-Jan-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a new Archiving stage to the scheduler, which runs after Parsing. This stage is responsible for copying results to the results server in a drone setup, a task currently performed directly by the scheduler, and allows for site-specific archiving functionality, replacing the site_parse functionality. It does this by running autoserv with a special control file (scheduler/archive_results.control.srv), which loads and runs code from the new scheduler.archive_results module. The implementation was mostly straightfoward, as the archiving stage is fully analogous to the parser stage. I did make a couple of refactorings:
* factored out the parser throttling code into a common superclass that the ArchiveResultsTask could share
* added some generic flags to Autoserv to duplicate special-case functionality we'd added for the --collect-crashinfo option -- namely, specifying a different pidfile name and specifying that autoserv should allow (and even expect) an existing results directory. in the future, i think it'd be more elegant to make crashinfo collection run using a special control file (as archiving works), rather than a hard-coded command-line option.
* moved call to server_job.init_parser() out of the constructor, since this was an easy source of exceptions that wouldn't get logged.

Note I believe some of the functional test changes slipped into my previous change there, which is why that looks smaller than you'd expect.

Signed-off-by: Steve Howard <showard@google.com>

==== (deleted) //depot/google_vendor_src_branch/autotest/tko/site_parse.py ====


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4070 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
15971eb96882aef31ced04e8866d680ddc1dab77 29-Dec-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Reworked the server side profiling support to use barrier to synchronize
starting and stopping of profilers on multiple machines. The synchronization
will only work with server side jobs that work with multiple host objects
in the same process (ie there is no multi machine synchronization done for
jobs that do early a job.parallel_simple() which forks a process per
machine because each separate autoserv process will only be aware of a
single host object).

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4064 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
fbf73aecdd357094ae05e7d1e4ea99b1ecf93ee4 19-Dec-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Refactor all of the persistent state managing code in the client job
class into the common_lib base job class. The major change is that all
the details of the job state implementation are pulled into a class
base_job.job_state. This class handles all the internal details of the
state managment that job.get_state and job.set_state did, and also
provides a mechanism for creating job properties which are automatically
backed by job state.

This also includes a major change to the semantics of state passed
between autoserv and any Autotest clients it ran. Previously the code
was a bit of a hack, with code in server/autotest.py that would
pre-generate a state file with some pre-set values, and code that would
pull back the state file after the client job and extract some values
from it, as well as some more code that would prepend a bunch of
state initialization calls at the start of the client control file.
Instead of all these hacks, autotest.py now just pushes all of the
state out to the client at the start, and pulls it all back at the end
(with a special exception for __steps that's difficult to eliminate at
this time). So any state set on the server is automatically available
on the client, and any state set on the client is automatically
available on the server.

There are a couple of outstanding issues:
* More of the set_state/get_state code needs to be refactored
to either use the automatic properties, or the job-internal state
API (so that all the internal state is not leaked into the "public"
state visible through get_state and set_state).
* The job_state class is perhaps somewhat overengineered. It's really
just a big, automatically persistect dict-of-dicts. But most of it
is actually code that was being used before, it was just scattered
all over server/autotest.py and client/bin/job.py so it was less
obvious how overgrownt he state managment is.

Risk: High
Visibility: Replaces a bunch of get_*+set_*+default_* methods with
persistent properties, refactors all of the state managment
into a single implementation consistently used in both the
server and client.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4022 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
02a3ba2fc7c974d1bebb186f210dc5f0314286fe 13-Nov-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a regression from the big job refactoring. The refactoring
introduced a piece of code in job.run that now depends on
job.control being a valid file (even though the new spec explicitly
defines it as being optional). The original code dealt with this
case (job.run with control=None, job.control=None) by defaulting
to an empty control file, so we just need to handle that case again.

Risk: Low
Visibility: Fixes a regression that shows up when running a
control-file-less job (e.g. cleanup with -C).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3948 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0d0f67d6abcf6599ad626042d3236020e093558f 06-Nov-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Create a base_job class in the common library as a location to
refactor common code from client/bin/job.py and server/server_job.py
into.

Initially this just creates the base class and attempts to refactor
some of the __init__ code into it. It also tries to refactor the
code somewhat so that it's easier to test without mocking out large
amounts of external dependencies.

It also tries to standardize on what all the official publicly usable
attributes are, mostly on the basis of looking at what the existing
code actually does. In general my approach was:
* If used outside of the job class, assume it's public. If it makes
sense make it a requirement of the base class, but in some cases
(e.g. serverdir) it really only makes sense for one of the
concrete classes. In that case I define it as "OPTIONAL", which
means it can be None (but must still be defined).
* If only used within the job class, make it "private", which means
it gets a name starting with _. Code outside of the job modules
shouldn't be touching these. This includes the "constants" that
we define with all-caps in the class.
* I added unit tests which try to actually validate this, by
checking that all the correct properties are defined after
__init__. The test cases are still limited (all the test_init
cases) because of the pain of stubbing out __init__, but I will
be adding more in the future as I refactor to reduce the amount
of mocking/stubbing needed.

Overall, I don't know that this change by itself makes the code
simpler or easier to understand, but I don't think it makes things
any worse in that regard, while adding a lot more testing and
finally giving us a well-defined interface. I have more changes
planned, but as new improvements kept creeping into this change I
decided to mail it out for some review instead of letting it grow
even bigger. Some ideas of what I still intend to do in followup
patches:
* Refactor more of the directory management code into job_directory, to
get the rest of the mkdir/makedirs code into there. That way all
of the directory management is concentrated in one place.
* Refactor all the of get_state/set_state code into something that
automatically handles this with properties without a lot of
boilerplate getter and setter methods.
* Refactor the job.record related code that's duplicated into the
base class.

Risk: High
Visibility: Mostly code changes to standardize the job class interface.
A lot of the visible changes just involve privatizing attributes
that aren't used outside of job anyway, or adding in attributes
that were only defined on the client or server.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3916 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
cf8d492a6eafdd03d88ad9dad676ae737ec898ec 14-Oct-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Log a message with a traceback immediately when an exception is caught that fails a test or job.

Right now, when tests or jobs fail, we execute various actions before providing any indication of the failure. Such actions include post-test cleanup, post-iteration sysinfo collection, post-job crashinfo collection, etc. The exception traceback can be separated from the immediately preceding line by hundreds of lines of unrelated logging output. Of course the traceback shows you exactly where the exception originated, but this separation in the logs makes debugging a royal pain.

With this change, whenever such a test- or job-ending exception is caught, on the client or the server, we *immediately* log a message with a traceback. We then carry on with the usual activities and eventually log the traceback again when we're recording failure. But the first log should make debugging easier and make things more obvious for new and experienced users alike.

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3852 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
07e27af54bd841e9a7b8d6d189fec3dd4ae2a92b 12-Oct-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> I realized that my initial addition of the default_profile_only
property was missing proper persistent state support on the client.
It won't be preserved across reboots, and changes to it on the
client won't be pulled back to the server. This change fixes that.

It also goes back to the setter approach for setting this property.
When I fixed this it occured to me that this was the real reason
we've used setters in the past for properties like this. I have
some refactoring in mind to clean up the handling of these stateful
properties, but that's rather substantial and I don't want to block
these changes on that so for now I just put in an implementatation
that's consistent with the "standard" handling we already have.

Risk: Medium
Visibility: Properly preserves the state of default_profile_only
across reboots and after client jobs.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3826 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
a6082efeb30cd86d09fcf25d55cde15dedd60fce 12-Oct-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Add a global mechanism to the job object to allow users to change
the behaviour of profile_only, so that all tests default to

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3818 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
7eacbc2a36d4efc50b67a429bf7b2f0cc0155b9a 29-Jul-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fixed multiple kernel control file generation for server side tests for
the case where the original test control file gives a "tag" argument to
run_test() by changing the server_job default test_tag attribute to be
instead a tag prefix.

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3465 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
cd5fac46fb434ddba1e06c6031890ac97e06d1ba 06-Jul-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Typo fix. sorry!

Signed-off-by: Gregory Smith <gps@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3374 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
e7d9c605bacd7b1816987994ae18a68c63306a16 02-Jul-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make the job executiontag available in both the server and client side job
objects as job.tag.

This is useful if your job would like to copy its data off directly to a
results repository on its own from the client machine.

Mostly small changes to pass the data down, though I did some docstring
cleanup near code that I touched which makes the diff larger.

The execution tag is taken from the autoserv -P parameter if supplied
and no explicit --execution-tag parameter is supplied. This prevents
the need to change monitor_db.py to pass yet another autoserv parameter.

Signed-off-by: Gregory Smith <gps@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3359 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
26f0d8819be1b4599a8798ae2df8e6c821be67ab 22-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add an info message about processing the control file
Add a warning if parallel_simple is passed an empty list of machines.

Signed-off-by: Scott Zawalski <scottz@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3314 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
a2b07dd35d7db4068c84c553e3784718579af17e 22-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Import logging into the namespace of server control files,
as it is for clients

Signed-off-by: Martin Bligh <mbligh@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3310 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
78c0daa57894f90cd0af051fe45310d367ea6099 15-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Unittest and typo fix for previous CL.

Signed-off-by: Gregory Smith <gps@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3285 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
415dc21b70d44616803cb5c0245248514b73adca 15-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Allow a couple of machines failing to install a kernel in the server
test kernel install stanza when >4 machines are supplied. This allows
for large multi-machine tests to proceed even if some of the hosts die
while failing to install or boot the kernel.

This is not the ideal implementation. We should really have some way
to get the max(sync_count) required by a control file's step_test()
before calling the function. Ideas welcome.

Signed-off-by: Gregory Smith <gps@google.com>

(this patch breaks a unittest. the fix is the patch i am mailing immediately after this, sorry. 2 mails is easier than merging them into one patch before mailing for me)


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3284 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
75cdfee87bfaa3cf3f9860832b228a6d32aaed2f 10-Jun-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Make autoserv and autotest client use the new logging_manager system. I'd like to split them into separate changes, but the change in common_lib.test means it all has to change at once.

this replaces the old ini-style logging configurations with code-based configurations. i know the ini files were easier to read, but we're doing a lot more fancy stuff with logging and these give us much more power and less duplication. as one example, we'll probably move very soon to having separate .DEBUG, .INFO, .WARNING, and .ERROR logs. This will allow us to make a centralized change to make that happen, rather than duplicating a whole bunch of information across .ini files, and it'll make the information much more concise.

Risk: Gravely high

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3243 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
efe4ebff90b023edf8e146b7bfa4a796d52eb1ab 22-May-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> A new version of the fix to handle race conditions between console
warning logging and status warning disabling messages. Instead of using
a clearly still-unreliable sleep, just hold up the logging of WARN
messages on the server side until we start seeing new messages from
after the warning coming in.

While this kind of buffing is rather unfortunate and means we're
delaying the logging of warnings, I just don't see any other choice.
We don't have a way to re-order status logs after the fact, so if we
log a WARN as soon as we get it then there's still always the posibility
that more status messages will come in that should've been logged
before it.

This still unfortunately leaves the reverse problem (logging warnings
too late instead of too early) but this is the much less common case.
It's also a lot less serious when it occurs, since it doesn't break
the warning enabling and disabling.

Risk: Medium
Visibility: Should prevent WARN messages from being logged before
events that they occured after.

Signed-off-by: John Admanski <jadmanski@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@3163 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
374f3419ad5de9e9c8047928d0851732f0b7c6da 13-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adds a -G to autoserv to be able to set host_group_name in the group keyvals
file that it writes. Useful only if someone has asked autoserv to run the
parser itself.

The scheduler does not need this as it will write that keyvals entry itself.

Adds a unittest for autoserv_parser and fixes a minor bug in --args support.

Signed-off-by: Gregory Smith <gps@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3137 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
fb9c0fad0f0cbe22b2e3eab39389f7bf87fbfdaf 29-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Special-case the crashinfo-only mode of running a job to only run
if there are existing uncollected logs. Otherwise just exit and do
nothing.

Risk: Low
Visibility: Bypasses crashinfo collection when there's no
uncollected logs.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3059 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
c86113b66e4f06eeecf0f3268d6abcf2e4ab4c3e 28-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added server_job.set_test_tag() function (similar to the one in
client.bin.job) to specify a default tag to use for run_test() runs.

Changed the way we generate server control files from the frontend to be
very close to the client control files (using step_init(), stepX()
functions for each phase of the test). Changed generation of server
kernel control file to properly deal with the case of multiple kernels
given.

Risk: High

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3051 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0a8c33262cb48723ef6ce5b0a6e1efec51f19914 28-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Modified import_site_class() to not wrap baseclass with a local dummy
class when the site specific class does not exist (thus hopefully fixing
an issue in SVN about not being able to run server side tests because
sysinfo cannot be pickle dumped), instead have import_site_class return
the baseclass when the site specific class does not exist. Also, have it
perform automatically the mixin of baseclass and the site specific class
when the site specific one is not inherited already from baseclass and
removed the mixin that was done in some of the users.

Signed-off-by: Mihai Rusu <dizzy@google.com>

Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3050 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
feac010c5bce042c7f6b887288d1a9d2f75f25dd 28-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added support to AbstractSSHHost.get_file() to not try to preserve the
orginal file permissions. Used this from crashinfo copying code to not
copy /var/log/messasges with 0600 privileges and such (which is common
on Linux distributions) and then not be able to read it in the frontend.
Also changed the way we copy the client control file wrapper to not
preserve the original permissions of the file.

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3048 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
3bff90985c87839728ec35d806162973d0a24531 22-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a race condition in server_job._update_collected_logs_list where
we need to make sure we flush the write to disk before releasing the
lock on the file.

We could probably improve things even more by doing the write
atomically using a rename, but that would require using a separate
lockfile and would complicate the code even more, just to deal with
the case where the write fails; and if writes to files in the server
results directory start failing these calls are going to start
blowing up anyway, just with different exceptions.

Risk: Low
Visibility: Fix a race in writing the uncollected logs file.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3027 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
48925deedc9c01d7a9f33176211df8e11edc0072 22-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Drop the code that's removing status.log at the start of a job.

Risk: Low
Visiblity: Don't delete perfectly good data.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3026 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
5896298fb82c48e9cb5d8fbb269cd0629efce225 21-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Only write a job keyval out if there isn't already a keyval with
"job_started" in it. This way we don't stomp all over any existing
values when doing secondary follow-up jobs like crashinfo collection.

Risk: Low
Visibility: Prevents secondary jobs from overwriting the keyvals of
the primary job.

Signed-off-by: John Admanski <jadmanski@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@3024 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
382303a6b7954cbea82f04d67e6afd411cb2294f 21-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> When we "touch" status.log make sure we don't damage any already existing log.

Risk: Low
Visibility: Follow-up runs like crashinfo collection can stomp all over
an existing status.log without this.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3023 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0931b0adfc6d6850b320952098cae839cf7035e8 08-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Wrapped every repair phase in a try/except to consume errors in repair
and run a verify after that should instead detect problems if still
present and raise exception accordingly. Removed the verify ran at the
end of all repairs in server_job since that should not be needed now.

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@2972 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
4b51d54cac39c1acc7ea0351b975587b95374f36 08-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> If a reboot fails, the exception should always float upwards; a
failed reboot is generally catastrophic and should by default be
treated as an exception.

Risk: Low
Visibility: Any code that calls reboot expecting to automatically
swallow exceptions may not like this, but any such code sounds rather
broken to begin with.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2971 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
210bae6eaa0330b38370712810f12bb36c00f438 01-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Summary: Fixing further breakage found using the -N flag of autoserv

Found more places of the code that were breaking autoserv due to the -N
flag. Try to fix the breakages.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2956 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
2de831102ab37db88f8b6be42a7493dc59c6e403 01-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up a problem when flushing the WARN logs on the server side. If
a flush happens just before an END log, then the WARNs will get logged
at the same level as the END which will really confuse the parser.

Risk: Low
Visibility: WARN messages logged just before and END messages should
get logged at the same level.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2951 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
16a7ff7af7fe2ae3093c5ad7452c516257184ffc 01-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> The enabling and disabling of warning messages unfortunately seems to
be rather racy. Unfortunately, since warnings and test status messages
are being pulled asynchronously from two different sources there can
be a skew of a few seconds between when the event actually occurs
and when the server thinks it does.

Ideally we could fix this by forcing some kind of sync but there
doesn't seem to be any way of doing that; we have no way of flushing
conmux output, and /var/log monitoring is even worse since we may
also have client filesystem buffering getting in the way.

I was able to fix all the cases I could reproduce by adding a five
second sleep before and after disabling and enabling warnings. This is
an...unfortunate way to fix it, but in practice it works rather well.
I'm not actually certain we can do a lot better, at least not without
completely restructuring the way we do warnings. And even then, we
still have network latency that can kill any approach that doesn't
use a "sleep for a moments while the buffers flush" anyway.

Hopefully this fixes things well enough; if this problems comes up
again thanks to > 5s skews then we may have to revisit this.

Risk: Low
Visibility: Adds some sleep to hack around warning monitor and
client status log time skew.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2950 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
a788dc4106627b2dc423d3c8e89fc8fd6c03c2b6 26-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> New version of the patch, I moved the logging config code right before
all the results directory checking, also made autoserv handle the flag
-N appropriately. While I was there, I found some bugs exposed by the
collect logs feature recently introduced when using autoserv with the
flag -N. So I think it's better to have everything fixed on one patch.

From: lmr



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2939 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
def0c3cccb3b77b2c7e3a90f427cf4a70292dfd9 25-Mar-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for running autoserv with a "--collect-crashinfo" flag
that tells autotest to run a job that includes ONLY the crashinfo
collection. This will pull back crashinfo, and if run against a
results directory from a crashed job it will also pull back any
client results that it can find on the remote host.

Risk: Low
Visibility: Adds a new mode to autoserv for just doing crashinfo
collection.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2933 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
4395bbd96ed53aec5fad87d6c169a47dfdb8c9dd 25-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added sysinfo support to log pre and post iteration (currently it logs
the contents of /proc/schedstat). Added client.common_lib.test hooks to
call pre and post iteration. Used the hooks in client.bin.test.runtest()
for client tests. Refactored server.test and added wrappers for the
pre/post iteration logging and used them on the new pre/post iteration
hooks.

For each iteration there will be a
resultsdir/sysinfo/iteration.N/schedstat.after and schedstat.before.

If there are tests that override execute() and implement their own
iteration logic they need to be changed over to override run_once()
instead and take advantage of the default execute() that supports the
pre/post iteration hooks and other things.

Signed-off-by: Mihai Rusu <dizzy@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2929 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
b18134f8faa7c5b4623760bc88650a65e70b2cac 20-Mar-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> As discussed on the mailing list, we implemented logging with a single
root logger and logging configurations per entry points. The entry
points affected are:

* Autotest client
* Autoserv
* Scheduler

We are sending patches for each one of those entry points. Now we don't
need to 'grab' loggers anymore to log messages, only need to use the
utility functions:

logging.info('msg')
logging.debug('msg')
logging.warning('msg')
logging.error('msg')
logging.critical('msg')

Which reduces complexity of the log system, and makes it easier for
developers to log messages, just select the level, make sure the
standard logging module is loaded, and profit!

From: Lucas Meneghel Rodrigues <lmr@linux.vnet.ibm.com>
Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2915 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
6bb32d74bb4c5c6ae8b76e01d58b8963bbf61849 19-Mar-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add some code to the server job and autotest classes to save off a
list of directories that need to be copied in order to retrieve
client log results. It uses file locking to sequence updates to this
file since multi-machine jobs will be sharing the same log file.

This is the first step in adding a way of doing post-abort (or any
post-SIGTERM) log retrieval. The next step will be adding a way in
autoserv to run a standalone "recover this data" job that will use
the data recorded in this change, and the final step will be to add
support to the scheduler for running this "recover this data" service
when catastrophic failure occurs.

Risk: Medium
Visibility: Adds an "uncollected_logs" file in the server job results
directory containing a list of remote directories that need to be
copied to recover the results of a crashed job.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2913 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
779bd2975601e982f4cfb07517bab064200fa7bb 19-Mar-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Touch the status.log file when a server job starts, so that once a
job run is started we can be sure that a file exists. This is for the
benefit of the parser, since it uses "does a status log exists" as the
criteria for determining if a job was/is running in a directory.

Risk: Low
Visibility: Once server_job.run is called a status.log will be
created and the parser will interpret the results directory as a job
results directory.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2912 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
838d82d6f45c421e88e4db5eed2478cc867cc81f 11-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Multiple machines job results can't be parsed correctly due to missing
keyval.
Run a simple multiple machine job like this.

#./server/autoserv ./server/samples/sleeptest.srv -r results -m
gpfsa1,gpfsa2
#cd results
#find . -name "keyval"
./gpfsa2/sleeptest/keyval
./gpfsa1/sleeptest/keyval
./keyval

No keyval file found under machine-level result directory. So that
status_version will be regarded as 0 by default. Thus, some format version 1
log will be wrongly intepreted. Given the following example log, no Failure
reason won't resported in Email.


START ---- ---- timestamp=1236446901 localtime=Mar 07 09:28:21
START sleeptest sleeptest timestamp=1236446901
localtime=Mar 07 09:28:21

FAIL sleeptest sleeptest
timestamp=1236446902 localtime=Mar 07 09:28:22 Command <ls
/nonexisted> failed, rc=2, Command returned non-zero exit status
* Command:
ls /nonexisted
Exit status: 2
Duration: 0
stderr:
ls: 0653-341 The file /nonexisted does not exist.
END FAIL sleeptest sleeptest
timestamp=1236446902 localtime=Mar 07 09:28:22
END GOOD ---- ---- timestamp=1236446909 localtime=Mar 07
09:28:29


#./tko/parse ./results -m

Job name Kernel Test name FAIL/WARN Failure reason
========= ====== ========= ========= ==============
temp/gpfsa2 gpfsa2 FAIL
temp/gpfsa1 gpfsa1 FAIL

- Possible fix
According to parser spec at
http://autotest.kernel.org/wiki/DraftParserSpecification, One keyval
file is desired for each machine result directory. Also, status_version
should be set as 1 to indicate the real log format version. I tried to
figure out a patch. Please review.

From: simon.x.zheng@gmail.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2867 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
c0a623d0ed63d2533823e7d70679c5faa2ce434c 03-Mar-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a type in server_job.py where we were pulling a site implementation out
of site_job instead of site_server_job, as we should've been.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2846 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f37df84b97538540185f91e2e5b62890ca407b3b 11-Feb-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add job.enable_warnings and job.disable_warnings methods to the job
classes, to allow you to disable and enable specific types of console
warnings from being logged. Whenever these messages are called an
INFO line is written to the status log.

I added three categories to the patterns, based off of suggestions
from Martin: BUG, OOM, and LOCKDEP.

There are some limitations to this capability; it the warnings are
basically disabled globally, there's no easy way to disable them for
specific hosts or tests. It could probably be extended to host-specifc
controls if a need arises, but extending it to specific tests isn't
really possible, there's simply no way for the console monitoring to
determine what test the warning is actually associated with. Note that
this is only a problem for tests run in parallel; if you are just
running a series of tests obviously the warnings can be turned off at
the start of the test and then turned back on after it is finished.

Risk: Medium
Visbility: Adds categories to the console warning patterns, and a
mechanism for enabling+disabling specific categories of warnings.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2771 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
e432dd20859352ba9fa4cb4343b66c5bbe2a7118 30-Jan-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a job.run_control method that can be used inside of server control
files to run other existing server control files. It's implemented as
a wrapper around job.run that redirects some of the messiness from
that method (and generalizes the method to handle this case better).

This CL doesn't provide an equivalent method on the client; I'm not
sure that's really practical, since on the client we don't have the
same guarantee that all the control files are already on the machine,
and if you really need to build up a composite control file you can
already do so on the server through at.run.

Risk: Low
Visibility: Adds some parameters to server_job.run to make it more
generic, and a job.run_control method to wrap it and make it easy
to run a control file from a control file.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2719 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
25c0b8cb56358f22dccf7fdc32dd1662787dc9ca 24-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added new host protection level (repair software only) that would allow any
type of repair except the hardware repairs. Updated users. Added
Host.request_hardware_repair() function to be called by repair_full when
software repair fails. Added error.AutoservHardwareRepairRequestedError to be
raised when hardware repair has been requested and updated server_job.repair()
to let it propagate through.

Signed-off-by: Mihai Rusu <dizzy@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2686 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
062ed15b8f7d4de6da101348bd33bb7b25f7aaef 13-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added a function to import site specific functions. Modified code to use it.

Signed-off-by: Mihai Rusu <dizzy@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2628 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
a700772e70548b10721ba709c7ec5194bb6d7597 13-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Created a client/common_lib/utils/import_site_class function to take
care of site specific importing of classes. Modified code to use it.

Signed-off-by: Mihai Rusu <dizzy@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2626 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
b88d6dc723de628c0da22513c59997eab29ab1f3 10-Jan-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Remove the reason logging from END messages when running a group
for "standard" failures (e.g. TestFail, TestError, etc.). The reason
should already be logged at the point of failure, so the duplicate
message is just noise.

Risk: High
Visibility: END reasons for normal failures should be empty

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2619 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
8ad24203e44d90dc6b0f18602452695881232440 07-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix bug that causes server side jobs to fail when an int is passed as the tag.
Risk(Medium): Minor change to run_test
Visibility(Low): Bug fix

Signed-off-by: Ryan Kubiak <rkubiak@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2603 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
170873e8869cae8bb9499d6128cf626e8110bf56 07-Jan-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Attached is a very large patch that adds support for running a
distributed Autotest service. Previously, the scheduler could only
execute autoservs locally and all results were written directly to the
local filesystem. This placed a limit on the number of machines that
could be concurrently tested by a single Autotest service instance due
to the strain of running many autoserv processes on a single machine.

With this change, the scheduler can spread autoserv processes among a
number of machines and gather all results to a single results
repository machine. This allows vastly improved scalability for a
single Autotest service instance. See
http://autotest.kernel.org/wiki/DistributedServerSetup for more
details.

Note that the single-server setup is still supported and the global
configuration defaults to this setup, so existing service instances
should continue to run.

Steve

Signed-off-by: Steve Howard <showard@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2596 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
ac367cc4ca95a4ad2be81ff818309d8913a11b44 22-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix typo mkdtmp -> mkdtemp

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2587 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
aebe3b69e2d44c6e1d25d970c2873865763d1032 22-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Don't write temporary control file terds such as control.srv to the current
directory when no resultdir has been set. Use a temporary directory instead
and clean it up afterwards.

Signed-off-by: Gregory Smith <gps@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2580 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
b5dac4323ac5dca003da7e8114e80ab99612ac73 27-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Provide the ability to drop caches between benchmark iteration runs

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2518 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0fce4110092cdbf71b2a414b1a3633c7faf73bdf 27-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix bug in repair and verify with parallel_simple

Verify and repair are writing their results out in the current dir
instead of the results directory. I suspect that never used to matter,
as they were often the same, but now it does.

Steve - please confirm this won't break the scheduler's usage?

Signed-off-by: Martin Bligh <mbligh@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2516 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
181b7c27b0519b147c39464a8151411d15f6693b 22-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add utils to namespace of server-side control files

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2493 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
2b92b86890745abe3e3ecc3205ad3dd4e891ff99 22-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Coding style fixes for server_job.py

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2491 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
550fdc28af1acb7d62f379cdfc67e5b5fdd725cf 20-Nov-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix some issues with the new Host.__del__ -> Host.close changes.
Adds a way for server_job to add hooks into the subcommand module
so that it can detect subcommand fork and join operations, and then
uses those hooks to add the necessary host.close calls for cleaning
up new Host objects created by the subcommand.

Risk: Medium
Visibility: Host objects are properly cleaned up even if they're
created in forked subprocesses and not just the top-level process.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2459 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
043e1132d1af7969a8f67871188ef34e050c2186 19-Nov-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> This depends on Martin's "run autoserv without a results dir" patch
to be applied cleanly.


A rather large refactoring and stubbing change working towards
client-side profilers from the server side. This makes a few major
changes:
- refactors almost all of client/bin/profilers.py into a common lib
profiler_manager class; except for the code for actually loading
a profiler object, all of that code is already completely generic
- add a server-side profiler_proxy class that will act as a proxy
on the server for using a client-side profiler, this doesn't
actually do anything useful right now but it basically just a
stub for later changes
- add a server-side profiler_manager implementation that creates a
profiler_proxy class instead of actually loading a real profiler

The intended changes still in the pipeline that will build on this are:
- add code to the profiler_proxy for actually making sure the
profiler is set up and installed on the remote host(s)
- add a mechanism for client-side profilers to deal with reboots

Risk: Medium
Visibility: Adds a bunch of stubs that don't actually do anything yet
but will do things soon.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2447 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
80e1eba601ad04856da1c33dd60cb20035c899fb 19-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Enable autoserv to operate without a results directory

This is incredibly useful for writing small, non-invasive scripts,
using the power of autoserv

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2444 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
53aaf388e48368aa0179622957912a5284b43dd1 17-Nov-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a hosts attribute to server jobs for accessing all the hosts in
use as part of a server job, and replace the __del__ method on hosts
with an explicit close. When the job finishes it will take care to
close out any hosts left in job.hosts.

This will allow us to implement generic code that operates on all
hosts currently in use, and also fixes the general reliabilty issues
that we've seen with the __del__ method.

Risk: Medium
Visibility: Host.__del__ calls are pushed off until the end of the
job, and all hosts in use are available via job.hosts.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2427 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
2bab8f45adedeacbf2d62d37b90255581adc3c7d 12-Nov-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Implement sync_count. The primary change here is replacing the job.synch_type field with a synch_count field. There is no longer just a distinction between synchronous and asynchronous jobs. Instead, every job as a synch_count, with synch_count = 1 corresponding to the old concept of synchronous jobs. This required:
-changes to the job creation RPC and corresponding client code in AFE and the CLI
-massive changes to the scheduler to schedule all jobs in groups based on synch_count (this unified the old synch and async code paths)
-changed results directory structure to accomodate synchronous groups, as documented at http://autotest.kernel.org/wiki/SchedulerSpecification, including widespread changes to monitor_db and a change in AFE
-changes to AFE abort code to handle synchronous groups instead of just synchronous jobs
-also got rid of the "synchronizing" field in the jobs table, since I was changing the table anyway and it seems very likely now that that field will never be used

other changes included:
-add some logging to afe/models.py to match what the scheduler code does, since the scheduler is starting to use the models more
-added checks for aborts of synchronous groups to abort_host_queue_entries RPC



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2402 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
45ae819b2d2a67d0882edafaf1a8f7b95c3fb9d2 05-Nov-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Add a formal cleanup phase to the scheduler flow.
-add a --cleanup or -C option to autoserv, which runs a new control segment, cleanup. this option and control segment obsolete the old -b option and reboot_segment control segment.
-change the RebootTask in the scheduler into a more generic CleanupTask, which calls autoserv --cleanup.
-change the host status "Rebooting" to "Cleaning"



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2377 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
55ff9521d0346285b870809883bda6ec658bdf8a 29-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove direct support for site_ control segments - this is handled
by method overrides now.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2352 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
3e66e8c6b65049a1d542e2ab4220fef09e3fa7bf 27-Oct-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Only write the .machines file when there's more than one host. The original code in the preamble did this ("if len(machines) > 1"). A recent change refactored the code and in the process simplified it to "if len(machines)". But this breaks the parser because it causes autoserv to write a .machines file in every individual machine directory for an async job, which confuses the parser.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2341 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
21baa459ea14f96e06212f1f35fcddab9442b3fc 21-Oct-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Add options to control reboots before and after a job.

-add reboot_before and reboot_after fields to Job, along with enums for each
-add options to create_job RPC for reboot_before and reboot_after
-add options to job create CLI for these fields, and made job stat -v display them
-add widgets to job create page in AFE for these fields and made job detail view display them

-add dirty field to Hosts, defaulting to True, and set to True when a host is locked
-made scheduler set this field when a job runs and clear it when a host is rebooted

-updated scheduler's PidfileRunMonitor to read a new three-line .autoserv_execute format, where the third line contains the number of tests that failed
-made scheduler Job.run() include a RebootTask before the verify task according to the reboot_before option
-made QueueTask.epilog() launch a RebootTask for each host according to the reboot_after option

-updated autoserv to write out a third line to .autoserv_execute containing the number of failed tests.

Other changes:
-added support for displaying Job.run_verify in the CLI (job stat -v) and job detail page on AFE
-updated ModelExtensions to convert BooleanField values to actual booleans. The MySQL Django backend just leaves them as ints (as they are represented in the DB), and it's stupid and annoying (Yes, bool is a subclass of int, so it's often not a problem. But yes, it can be.).
-get rid of use of Job.synch_count since we don't actually support it. I think this was meant for inclusion in a previous change and got left out.
-made the scheduler use the new setup_django_environment stuff to import and use the django models. It doesn't *really* use the models yet -- it just uses the Job.Reboot{Before,After} enum objects -- but this shows we could easily start using the models, and that's definitely the direction I want to go long term.
-refactored PidfileRunMonitor generally and made it a bit more robust by having it email errors for corrupt pidfiles and continue gracefully, instead of just crashing the scheduler
-changed the way Agent.tick() works. now, it basically runs through as much work as it can in a single call. for example, if there's a RebootTask and a VerifyTask, and the RebootTask has just finished, in a single call it will finish up the RebootTask and start the VerifyTask. this used to take two cycles and that was problematic for cases like this one -- the RebootTask would like to set host.status=Ready, but then the host could get snatched up on the next scheduling round, before the VerifyTask got started. This was sort of solved previously by keeping the HostQueueEntry active, and we could apply that approach here by making a new status for HostQueueEntries like "Rebooting". But I prefer this approach as I think it's more efficient, more powerful and easier to work with.

Risk: extremely high
Visibility: new reboot options for jobs, skip verify now displayed in AFE + CLI

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@2308 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
084bc17038b083a6ee5548b072a64d44238368d9 18-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix error messages during execution of server control files to reference the
correct line number out of 'control.srv' rather than a skewed line number out
of '<string>'.

This removes the prepending of needless predominately import-only preamble
code and instead does that inline to populate the control code namespace
before executing the control code.

Signed-off-by: Gregory Smith <gps@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2300 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
c09fc1543a3f77026bab728770aa0191feaddd07 15-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Make sysinfo more configurable. This adds some methods to the job
classes, job.add_sysinfo_command and job.add_sysinfo_logfile, that
can be used to add more commands and/or logfiles to the standard
sysinfo collection for the job.

Risk: High
Visiblity: You can add code to control files to customize sysinfo
collection.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2289 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0910844396c68a8747dc1ab580fb898ecff2469e 15-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Keep track of the last kernel we explicitly 'reboot'ed into. This
should be the default for any subsequent reboots.

Fix a bug where we would set the default label on a platform when
host.rebooting() from the server side (when only a boot_once was
called for). Also fixed a bug where label=None would NOT reboot
into what was supposed to be the default kernel.

Fix a bug in the state engine which made it impossible for None to be
the default of a state variable.

Risk: High
Visibility: High (this tweaks the semantics a bit; most people would
have called the behavior a bug, but some may have
depended on it)

Signed-off-by: Jeremy Orlow <jorlow@google.com>


Make boottool handle the None case on boot_once and sanity check
it for set_default (since it takes an index, and Null is not a valid
use).

Risk: Medium
Visibility: Medium

Signed-off-by: Jeremy Orlow <jorlow@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2287 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
bfb32f8d1b5b83506f7a91dd34efcc6e1feede5d 04-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> We should never abort a job just because we had trouble copying off
logs; eat the exception and keep going.

Risk: Low
Visibility: Jobs shouldn't suddendly abort just because something
completely unexpected happened during log collection.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2242 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
1b3b376d94edee8f235f8669a047dc00751bf97a 25-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename client/common_lib/logging.py to client/common_lib/log.py in order to be able to use the standard python logging module

Python has a standard module used to perform logging operations
(http://docs.python.org/lib/module-logging.html) that could be used
inside autotest, however we have a common_lib module named logging as
well, that makes difficult to import the python logging module in all
other parts of autotest (including tests).

So this patch basically renames logging to log and fixes all references
to it. All the files touched were pylinted and basic sanity testing was
made (running autotest with different control files).

About the risks, in my opinion it's worth the effort, since we gain the
ability to use a powerful logging library, that would help us to
implement a better logging system inside all autotest modules.

Risk: Medium/High - Even though care was taken to ensure all references
to logging were changed, it touches a fair bit of the code and something
might have passed unaudited.

Visibility: Low - Should be invisible for all users, and developers must
just remember that now logging is called log.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2193 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
025099d7cc9131e48e92a69eacfda55f0eaba76c 23-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix some missing imports in server_job.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2189 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
38d047c9556207f3aea84802677463784b3497b8 23-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Attached is a fix for a missing import in server/server_job.py

From: Jean Parpaillon <jean.parpaillon@kerlabs.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2186 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
cdd0c40560c8d514a56834b31063bcb5ec50eccf 19-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add code to SSHHost.get_crashdumps to collect some basic data:
- /var/log/messages
- /var/log/monitor-ssh-reboot
- dmesg
This modifies the job execution code to only call the crashdump
collection is the job fails (i.e. is aborted somehow). The dumps
will all be put in a crashdumps.hostname directory.

Risk: Medium
Visibility: On job aborts we now wait a while for the host to come up
and then collect crash logs.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2176 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
5ff5535100eb6259ba2bca5a6587bb6562eb68ab 18-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> All server side status logging should be into status.log, not status.

Risk: Low
Visibility: Fixes some edge cases where server-side job.record calls
never get parsed due to the logs going into the "wrong" files.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2168 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
23afbec41f6275bef4e80c36726916b0be564204 17-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a standard run_cleanup option to test.run_test that can be used
to enable/disable the running of test.cleanup after the test
completes. This also adds some global state on the job objects
that can change to default for tests from enabled to disabled.

Risk: Low
Visbility: Adds ways to disable test cleanup at both the job and test
level.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2167 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
a1f3c20cb943bd56c6aaee16b2b21dca83a5177d 15-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Refactor the results collection code to run out of a separate class
that we can reuse in different places, and change the mkfifo code
to use a filename created on the fly, rather than hardcoding a fixed
filename.

Risk: Medium
Visibility: Mostly just a refactoring.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2159 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
807490cd3beeb7d91a0ab12a0ad3f507bde25f64 15-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a method to the Host objects for logging the currently running
kernel, and a method for logging "informational" status logs that
update the kernel without requiring any real action to occur. This
logging will always occur at the start of a client job, for server-side
jobs it will still be opt-in only, since we don't have a clean place
to log it where we know we have access to a host object.

Risk: Medium
Visibility: Client-side jobs should always have a real kernel
associated with all logged tests, and server-side jobs have an easy
way to log the same thing.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2157 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
b6eb2f19e1225b14dee3839c2945caf6bc90fa73 12-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> First pass at pulling back test results during a client job, as each
test completes. Definitely needs some testing, cleanup and refactoring
before this can be considered complete, but this is a good, working
start point.

Risk: High
Visbility: Test results should now be pull off of client machines as
the tests finish.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2139 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
4dd1a00ac03c0a86ce26edf0b2b328999852a261 05-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix job.parallel_simple to skip all the fancy resultsdir handling
code when log=False (to make it consistent with log=False with
the base parallel_simple).

Risk: Low
Visibility: Fixes some cases (e.g. collecting crashdumps) that use
log=False.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2112 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
609a5f414e36609f117b5f4ff8dee5cef9a89b85 26-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> If we change the resultdir for a job, we need to chdir to it. We do this on server_job.__init__ so there's a general expectation from at least some of the code (e.g. autotest.py) that this is generally true.

Risk: Low
Visibility: job.parallel_simple calls no longer lead to cwd != job.resultdir

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2041 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
de292df7250c55c801199cdce5ffa33ef8171d7c 26-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fixes up a couple of differences between the server and client side
job.run_test implementations. In particular, this changes the
behaviour of the tag parameter to work the same way on the server
as it does on the client, and it adds a boolean return to run_test
that returns True on a GOOD result, False otherwise, the same as it
already does on the client.

Risk: Medium
Visibility: The server job.run_test is now a bit more like the client
side version.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2039 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
8e72aafe73c85c765c6878836997d6123b9fab74 20-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a bug in the SSHHost -> create_host conversion that didn't
missed some parameters that needed to be changed to keyword
arguments.

Risk: Low
Visibility: Fixes the reboot, install scripts generated by the
server job.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2015 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
1c5e3a1ede43cf3b71a02411489972a36ff0f5f1 16-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Initial refactoring so that I can change the serial console
monitoring. For now, I just pulled all of the console stuff out
into a separate SerialHost class so that it's isolated from the
SSHHost code.

This also adds a create_host factory method into hosts/__init__.py
I'm going to mail another patch later that converts existing code
over to use hosts.create_host(hostname) to get a host object, rather
than using hosts.SSHHost(hostname).

Right now the current structure is rather painful; for example I had
to make SerialHost a parent of SSHHost so that I could make the changes
without breaking existing code. Adding new features will have the same
problem; you have to cram them into SSHHost, or else no existing code
will use them. In the future if we use this factory method it'll be a
lot easier to add new features and expose them to existing tests by
default.

Risk: Medium
Visibility: Changes the internal hierarchy of the server.hosts
classes, but shouldn't affect other code that uses SSHHost.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1998 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
106464469a546fb129c46d4c19d154b466ecc63f 13-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Now that we've finally figured out how to properly create site_*
classes and work them into the inheritance hierarchy without creating
circular dependencies or three separate files, apply this technique
to the worst offender, server_job.

Risk: Medium
Visibility: Internal code change only.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1978 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
4aeefe11ff58518eb925a41d51168ff06d514ac4 20-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up a whitespace issue that was messing up the method definition indentation
in server_job.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1729 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
57e78664e91c1cc6b1da07da674697e250282831 17-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Moved client_logger class back into server/server_job.py

From: Travis Miller



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1715 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
fa970da75b81238bdeb9e09a8f286af650bd323e 10-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Allow site extensions to server_job.py

From: Travis Miller <raphtee@google.com>

Allow dealing with site specific behavior in the command line parser that was previosly factored out of server/autoserv. This required breaking the base class base_server_job out into its own module base_server_job.py



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1670 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0afbb6369aa5aa9a75ea67dd9e95ec4b21c0c181 06-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Convert all python code to use four-space indents instead of eight-space tabs.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1658 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
63aa38928660fbcc38abbab530c9d7e2e5646f97 06-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up some server job imports, whitespace.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1647 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
193a9ca8965d72e7fc705e99cfbaa16866e17aa2 06-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add in code missing from a prior patch that adds a toolsdir attribute to
server_job.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1646 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0ab8feea6356a1fbe6aa55ac5a1fde4b6164712d 06-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low
Visibilty: Verify/Repair don't work without it.
Update ssh_port and ssh_pass to use self. in def verify and def repair

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1641 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
d660afe45d87270b509e069a44834d0244ae2090 06-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for tagging subdirs independently of the testname tags.
This allows you to group multiple test runs under the same name
while still storing their results in unique directories.

From: Duane Sand <duanes@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1620 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
1965dfa167c65fea2c49536f1fc329ac7203828a 04-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> New options and automatic ssh key setup

Risk: Medium
Visibility: Adds three new argument options --ssh-user, --ssh-port, and --ssh-pass, which overrides the global default 'root' and '22' for all machines.

Adds the option to pass user, port and password per-machine in the format user:pass@host:port (overrides --ssh-user, --ssh-port and --ssh-pass).

Adds the pexpect.py and pxssh.py modules to autotest tree, these modules are used to interact with interactive programs.

The --ssh-pass option and pass field on machine string is used only to perform automatic ssh key setup on remote machines, which is also implemented in this patch.

Signed-off-by: Ramon de Carvalho Valle <rcvalle@br.ibm.com>
Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1600 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0c10955b4d2044c2071a6a0daf33691b2ee68a94 02-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low
Visibility: Fix up the reason field associated with server-side
group failures.

The existing code for logging group failures on the server-side just
uses the traceback as the reason field. This is pretty much completely
useless, as it results in a reason of
"Traceback (most recent call last): ". Instead, do what the
client-side code already does and first prepend the line with the
actual exception text (so the traceback will only get included as
non-parsed debug output).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1576 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f35bbb646aa5675e6aaa547cce0cf41adbace9c9 29-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Medium
Visibility: Adds kernel version info to the reboot logging even
if you do a server-side reboot.

Add in a call to host.get_kernel_ver() as part of the
host.reboot() process, so that the new kernel version gets captured
as part of the status logging.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1571 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
28816c20c5b810993b347da018aed153a41007e2 21-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low
Visibility: Should eliminate test failures caused by problems inserting results
into the tko database.

This wraps all of the insert_test calls used for the continuous parsing in a
try-except handler that logs a warning to stderr that the insert failed, but
continues running anyway. In the case of intermittent database issues, this
will prevent long-runnings tests from failing part-way through just because of
a problem saving the result.

A full parse of the results is still performed when the job completes, so the
results will eventually make it into the database, but given the choice between
the continuous parsing producing temporary incomplete results and an aborted
job, it seems better to just continue with the job.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1536 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
96bb7646c481ce60d5bcd323c054b2f0093aa1ef 15-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low
Visibility: Fixes an error in the continuous parsing of some server
side jobs.

Fixes a bug where server_job.__record would pass the text is writes
out to the status logs as a single "line" even if the text contained
multiple lines. The parser is expecting a list of actual lines of
text so __record.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1519 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
6e8bf75b13c28c5424fb447ceb4d8749c7a13251 14-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add the version 1 of the TKO parser, modify server_job to use this
version, and modify parse.py to look up the status version number
in order to instantiate the correct parser version.

Basically, it's an implementation of the parser that follows
the spec as outlined in
http://test.kernel.org/autotest/DraftParserSpecification. I did that
by implementing the "version 1" parser, as opposed to the existing
"version 0" parser, and it also adds some code to autotest itself to
log the fact that the status logs being written out follow the
"version 1" specification, so that when re-parsing existing results
older logs will still be parsed using the old (rather ad-hoc and
difficult to follow) algorithm.

The implementation is fairly similar to the existing version 0
implementation; it still uses all the same files for gathering
results, but there are the core changes:
- instead of grabbing kernel information from build.log, it gets
embedded into the status logs associated with reboots
- if a group is lacking a proper "END" section it implicitly assumes
it was somehow aborted
- reboots are wrapped in a group
- a "JOB" result is logged even if nothing bad happens (rather than
only logging it when something bad happens)
- you can have arbitrarily large amounts of group nesting

Signed-off-by: John Admanski <jadmanski@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1511 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
302482ea9ed9407ce1ac736ac9adcac814ad5a7d 01-May-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a new status field called TEST_NA (in addition to PASS and FAIL).

From: Travis Miller



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1476 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
0a1727ae18425e06e0430acff25f84c39ae2d556 21-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> convert format_error() to traceback.format_exc()

From: Scott Zawalski <scottz@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1457 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
ccb9e18237137e547fc0f815506710a8b1d94453 17-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Convert all imports on the server to use absolute imports.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1452 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
fe0af111da175d673ba49926d1976a46fb40a657 17-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> The parser cleanup should be idempotent. Also, renamed from _cleanup
to cleanup_parser to make it clearer exactly what it's cleaning up.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1449 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
6437ff5bb28a0cc97582766826f866a39affae2a 17-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Use the new parser library directly inside of autoserv, instead of
repeatedly invoking the parser as a separate process. In order to
actually invoke this capability you need to pass in a -P option, with
the job name (tag).

In order to properly support the parsing of server-side synchronous
jobs you need to make use of job.parallel_simple, a new wrapper around
the standard parallel_simple that adds support for parsing the results
of all of the parallel jobs individually. Unfortunately, complex
server-side synch jobs that use parallel instead of parallel_simple
will be unable to take advantage of this.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1446 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f5427bb08d4f783874e9de7fd31e259cb5207d36 09-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up the importing in server/hosts to not be so fragile. Importing
utils from these modules was just a bad idea (it depends on the server
dir being in sys.path) and the circular references between some of the
modules are making things unnecessarily fragile.

The main changes are:
- converted all of the imports from the server directory and from
the common lib into absolute imports (i.e. from autotest_lib.*)
- moved the RemoteHost definition into a remote.py file, so that
SiteHost can subclass Host without introducing a circular
dependency between base_classes and site_host

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1417 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
caa62c2a72c0300254998f21f4aca4579f251da4 07-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Implemented hooks for external logging infrastructure for storing both server-side and client-side logs.

Signed-off-by: Svitlana Tumanova <stumanova@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1408 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
4e61c4e6479dccb3f34dcd4922f1647a81b06c08 07-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> 1. Modified the runtest() function in test.py to not fork off a separate client process for the test but instead call it directly. This was needed to catch the exceptions that were thrown in the tests (as it wasn't possible to do that if the tests are separate forked client processes)
2. Modified the run_test() in server_job.py to log the exception detail too when a test fails.
Testing : I tested the change by modifying sleeptest.py to simply raise a TestError and trigger a failure purposefully and see how the failure reason was logged into status.log

From: Ashwin Ganti <aganti@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1406 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
b03ba64bfac2f4268198c84974663923ca456621 13-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Patch to reduce the rate of reparse, and to make the parser locking
be non-blocking where we skip the parse on failure to acquire the lock
rather than blocking (and building up a backlog of redundant parses).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1345 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
fe749d268bec0a2142089f44d4374cad362b046d 07-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> When autoserv is runing a job through ssh, it should just send all
output from ssh to stdout, rather than sending ssh errors to stderr.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1315 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
ddd5433a1ccd5959933f6dec98ee78b3ef403723 07-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a parameter to server_job.run to disable the collection of crashdumps.

From: Svitlana Tumanova <stumanova@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1314 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
71d340d5516f12262c04f1917364eeb51b3bdbb7 05-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Properly indent console WARN messages that appear inside of START-END
groups. Also, modify the parser to interpret the status of a group as
being the "worst" status message logged in that group, not just
whatever status is associated with the END message.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1299 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
dbdac6cf9aa00f624d4a3373c943e77398554a78 05-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Continuously reparse the status logs whenever new logs are written out
on the server.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1298 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
16c722d5d264ee8f546606bd909b66e9908cf423 05-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove ReverifyTask altogether, and trust the return code of autoserv repair (which does a reverify itself). The flowchart on the wiki is updated.

Also change autoserv's repair code a bit so we can really trust it.

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1294 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
dab3966fdf65b8d047fdb4ede5d642e498d8b2f9 27-Feb-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move the code responsible for pulling client-side status logs over to
the server into server_job so that it can be integrated with the
serial console warning monitoring.

Signed-off-by: John Admanski <jadmanski@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1270 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
1fb77cca1dbedcce7655b741f6d2e866e9a72726 27-Feb-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Write out a .machines files in the server-side preamble whenever there
is more than one machine. This should ensure that such a file is
always in place.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1267 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f4e0415fbf9a4e6b1b226e5c2f04a2b3c24be047 21-Feb-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Replace the current expect script based console warning montitor with
something properly intergrated with the job.record based logging code.
To facilitate this, replace the original expect script (and the
cat-based console logger) with a single python script that performs
the functions of both.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1255 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
8141f863d25724a7a970ff7bd19769ee42b4d7a0 25-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> oops. repair should call verify, not itself

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1198 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
970b94e3bba59bca9d37b4cb5c5b024a9a2ac439 24-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add in a hook to server_job to allow the gathering of site-specific data
for the job keyval file.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1191 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
e25fd5bfba721e315795eabb712215eeb8d2af39 22-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Change verify to throw an error if it fails, and record things
correctly

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1188 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
d56eb59a83a31ae4403794accf01d36f905bc088 22-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Ran into another bug where a file is written to without checking
if the directory already exists. I ran into this because my test
had some errors in it, which is probably why it hasn't been caught yet.

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1185 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
4d6feff83e2a38c74fa7e935971baa453ed97341 14-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix exceptions not to be strings

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1157 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
b3c9f37ca54d7695aa9df893db0b60454cd50e0c 14-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Update for having profilers run on machines where there are no
autotest jobs running.

Signed-off-by: Colby Ranger <cranger@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1155 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
98ff146654b249f1496183a32791958a1145451c 19-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Another new version. This one removes the "cleanup" code, too, since it
never seems to actually get used, other than this one mistaken use that I
removed.

From: jadmanski@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1090 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
e8b37a9b94566f7a44da5f56a84aa6f348b2db2a 19-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up parse so it can reparse a job - allows continuous status

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1087 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f3f5cbac97faf916c5031202e2a4ec2baef60dc9 11-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix linebreaks in server_job.py

While I was looking up the fix for barrier.py (see previous patch), I've
noticed that there was a line broken on server_job.py'>server_job.py for no apparent
reason, since doing everything in one line wouldn't break the 80
character width restriction. I thought it wouldn't hurt to send this
patch :)

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1056 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
e1417fa0334ac4e2ab6064e42de0bb891e561057 10-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> * Added support for barriers to the server.
* Allow slaves to run HTTP servers and let the master connect to them.
This is for networks where some connections to machines can only be
initiated in one direction.
* Added a client test that would kick off profilers and run them in sync with th
e server.
* Added a server sample test that uses the client test.

From: Colby Ranger <cranger@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1048 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
d0868abe656dce96fcc43d53c463cb3f3fe4fe2f 04-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Integrate git and git_kernel into server_job.py

Add new classes to server_job so they can be used in server side scripts.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1032 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
03f4fc7be7966d839d6055021424b8a9d430faa8 29-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Pull the server-side errors.py into the common error library.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1007 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f31b0c0060dd688c80be3bb97ffdfa193e3d924b 29-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move error.py'>error.py'>error.py out of the client and server and into common_lib.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1003 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
7f86e0b36a379b7c26ca8df0e453432df3e9dae5 24-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for checking and fixing disk space.
We check in the general case for diskspace on $AUTODIR

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@974 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
ed5a410cd2a432ff8c0b5201c6991016c70e982f 20-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move the verifier script into a separate file, and add support for extending
the verifier with site-specific verifications.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@946 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
faf0cd4c3c8845010909a15a3c5ff355eb26b24f 19-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Running autotest_client should give the same exit status as running
autotest directly (i.e. non-zero on ABORT, zero otherwise). Also,
running autoserv should produce a non-zero exit code if it runs a
client-side test that is aborted, although this does not actually
abort the server-side job itself.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@944 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
119c12a73ec74ea7f259f7db39d994055db1b609 12-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Extract the logging decorator used in kernel.py into a common library
and add it to Autotest.install to provide logging of autotest
installation failure (and success).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@937 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
1d42d4ed1b9e96eedffa5b14cae18b9f1a4da95d 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a simple verify and repair function to autoserv for the
scheduler to call. This does a little bit of stuff each, and will
be useful, but basically it's a starter

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@922 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
30270306182f4feb599278ce8a7412fa8526eb68 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Improved the reboot logging to be consistent between client and server
side reboots. Also, removed the "job starting" log that was produced
every time a job moved into a new phase.

Also, timestamp logging was added on the client and server side. Any
logging done in job.record will have timestamp (time since epoch in
UTC) and localtime (human-readable local time) values added to it.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@914 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
31a49de4b79d27bf2d3c96f9b918934804b6796f 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Reboot status is (again) logged, this time more cleanly through the use
of job.record.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@901 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
009b25a75a1f7030e0524275ef0df0f21c3fd02f 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix stupid typo in install hook

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@899 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
22011e460a5111341ab5813cf24163f21a07a359 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove error redirection to status.log.

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@895 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
17f0c66d6389cca75951cbc43f2885e06523161f 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix indents in server_job.py

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@891 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
7b32ba3930e3684356520070059e0afd99a0bfb3 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up server_job to add .machines file to multi-machine jobs

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@888 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
3ccb859a0a17216db59a7ad32b8c896fcec6ea9c 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make sure debug directory exists for logging stdout/stderr to

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@887 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
6e29438d7dbdf6d922ff15e97802a3e451ee8208 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Take 2 at fixing merge errors with crashdump hooks

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@885 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
303ccaccec36fba368a753e18a8c8773ebd03259 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Attempt to fix up some merge errors with crashdump hooks

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@884 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
3f4bced3bd862f2ab96f3672631d0160aa7c1e37 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make sure stdout and stderr are written to autoserv.std* files.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@883 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f36243d8ac8d14e9fee56b304657413c4cd1ea23 30-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Below is the shell for installer support. At the moment, this is
only useful for hooking into the Google installer, but the code
is generic - need to add a class for supporting one of the open
install tools elsewhere.

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@862 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
87c5d884225e05d1d679f427704a6ecaa441a72f 29-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> This patch adds logging for reboots into the status log so that you can determine if a machine is busy rebooting (or that the reboot has timed out) by looking at just status.log. It also enhaces status.py to handle all test status values, not just GOOD, WARN and FAIL.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@859 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
60dbd50c0d512d8ae659f144454b87062acf3c62 26-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> When executing a server control file, make sure we run it inside a copy of the provided namespace. Otherwise objects created inside the control file may leave references lying around and never be cleaned up. Since we rely on SSHHost.__del__ to clean up logging processes, this can be a big problem.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@850 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
84c0ab170b83c125974c06619e50790eab7c92a0 24-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> disable logging during post-test reboot (it was blowing away the logs)

From: adrianbg@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@835 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
18420c23e5acc2713f4719a3b56b3823252fa497 17-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Change 'tag' to 'label' for labelling jobs with arbitrary info

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@810 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
3dcf2c9748d594714d98b089178e015ddaf615c0 17-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove status file before we start

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@809 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
05269369a9bbfee9481ce8b03b88f7abce4bad7b 16-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for tests on the server side

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@807 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
43ac5220bbd900379206ebc540e560b01ec2d44b 16-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move tests into self-test

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@803 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py
f1c52841de1cad263a0ec83ee551deeff0cc0bb2 16-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move the meat of autoserv into a separate job class, and provide logging
functionality to a server-level status file

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@801 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/server_job.py