History log of /external/autotest/frontend/afe/site_rpc_interface_unittest.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
aec9901aa25aecfc58d8e1c9b867c624109d7fe2 07-Jan-2016 Dan Shi <dshi@google.com> [autotest] Support uploading a service key file to moblab

Add RPC to accept an uploaded key file and save it to
/home/moblab/.launch_control_key
Add a new tab in moblab setup page to allow user to upload a service key file.

BUG=chromium:570705
TEST=verify with a local moblab build

Change-Id: Ib54a6b707cb93bb5220e29ed6feeb854f5f4abe8
Reviewed-on: https://chromium-review.googlesource.com/321140
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Simran Basi <sbasi@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
07a109f19cd7363fb5440c72e870802392b7ce24 22-Jul-2015 MK Ryu <mkryu@google.com> [autotest] Sync host's status

For hosts in shards, their status is never synced with master.
Users should go to shard AFE to see the host's status.
This CL syncs the host status via shard heartbeat.

BUG=chromium:510996
TEST=puppylab. Change a host status in stumpy shard manually,
and check if it is synced to the master.
DEPLOY=apache,shard_client

Change-Id: Ic2bdce6aeeea868cbb000a79b6301e4848514be7
Reviewed-on: https://chromium-review.googlesource.com/287615
Reviewed-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Mungyung Ryu <mkryu@google.com>
Tested-by: Mungyung Ryu <mkryu@google.com>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
5dfcc89c498c0efd647afe7baef14334346b42d1 17-Jul-2015 MK Ryu <mkryu@google.com> [autotest] Create a shard with multiple board labels

'atest shard create' allows only one label for a shard.
Since our sharding architecture allows multiple board labels for
a shard, update atest tool accordingly.

Old code only lists all shards with 'atest shard list' even
in the case a user passes 'shards' parameter.
'shards' parameter didn't work. This CL corrects the feature.

In addition, old code doesn't have '--label' option for
'atest shard list', but there is a code to parse the option.
Removed the parsing code.

BUG=chromium:489914
TEST=Test 'atest' tool on local machine.
DEPLOY=apache

Change-Id: Ia18374d9b8b9d44ead63c98cc13fb47a84ddf70f
Reviewed-on: https://chromium-review.googlesource.com/286194
Trybot-Ready: Mungyung Ryu <mkryu@google.com>
Tested-by: Mungyung Ryu <mkryu@google.com>
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Mungyung Ryu <mkryu@google.com>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
e301eb76e56ffbf958cceded3920808a29912510 25-Jun-2015 MK Ryu <mkryu@google.com> [autotest] Reroute some RPCs called to a shard to master

create_job and create_suite_job RPCs should not be handled by a shard.
They should be redirected to the master.

BUG=chromium:503188
TEST=puppylab. Submit a dummy suite in a stumpy shard.

Change-Id: Ibe432655c677024e9eee1f4aca118ef6db7951f7
Reviewed-on: https://chromium-review.googlesource.com/281818
Reviewed-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Mungyung Ryu <mkryu@google.com>
Tested-by: Mungyung Ryu <mkryu@google.com>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
773a86ebaa2e4e4cce213b8553aeb4b30c1f3a9d 14-May-2015 Simran Basi <sbasi@google.com> moblab_setup page: Save config diff to shadow_config.ini

Updates the moblab_setup page to only save the changed settings
to the shadow_config and not the whole config which eliminated
our ability to AU config changes. Now that only the changed settings
are saved we can properly toggle on/off features remotely.

BUG=chromium:487415
TEST=local moblab setup and unittests.

Change-Id: Ie75de09d196673f14908519a228e9bc0b18c0095
Reviewed-on: https://chromium-review.googlesource.com/271171
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
abe3bb7d47369bc734ca5a68b0919db0d944e370 20-Nov-2014 Prashanth Balasubramanian <beeps@google.com> [Autotest] Time the staging of control files.

To debug some apache slowness this cl times the staging/parsing of
control files. This operation is the main suspect for the slowness
of the create_suite_job rpc.

TEST=Executed the rpc.
BUG=None
DEPLOY=apache

Change-Id: I3c3892054a33a52dd31d467567b09862395dc91b
Reviewed-on: https://chromium-review.googlesource.com/231079
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
6285f6acffd9ed3176cdc89544944a87340ac0b1 09-May-2014 Prashanth B <beeps@google.com> [autotest] Retry when staging a control files fails in run-suite.

The cl also adds some stats for reporting run_suite failures, and
sneaks in some autoserv testing changes.

TEST=Ran run_suite against a bad devserver, raised the exception.
BUG=chromium:418928, chromium:359741, chromium:371644

Change-Id: If49a3b96c053432cb26a01a02e160176be37c037
Reviewed-on: https://chromium-review.googlesource.com/220973
Reviewed-by: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prashanth B <beeps@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
02e6129187328bd3edd96dae8062e6a19ab7936c 17-Oct-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Allow job updates from shard without shard_id.

In the following scenario currently an exception is raised:
A job was synced from the master to a shard. It was then aborted
on the master, while the shard was executing it. The abortion
sets the shard_id of the job back to null (that happens always
when a job is set to a completed status).
The there was no heartbeat between the abortion and the completion
of the job on the shard.

The next heartbeat will find the completed job on the shard and will
try uploading it to the master. The sanity check if the job is a
assigned to the shard it was uploaded from will fail, as the shard
id is set to null on the master.

This changes this behavior: The sanity check will not fail if
the shard doesn't have a shard_id set.

BUG=None
DEPLOY=afe
TEST=Ran Suites.

Change-Id: Ifd8eafd3898e7fadab6e52e48bc033acd5ae1dd5
Reviewed-on: https://chromium-review.googlesource.com/224110
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
1b52574752be108a743d3b33561c34324f8538e7 30-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Retransmit hosts and jobs if heartbeat failed on client.

If the client fails while performing a heartbeat, the master will
have already set the shard_id and therefore won't ever send jobs or
hosts again.

This changes this behavior: The shard client sends ids of hosts and
incomplete jobs it already has in the heartbeat.
Objects with id's that weren't sent, will be returned by the
heartbeat regardless of already having a shard_id set.

BUG=None
DEPLOY=apache
TEST=Ran suites

Change-Id: I46bbb13a81886476ec48c6f879f123290769b659
Reviewed-on: https://chromium-review.googlesource.com/220692
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
852ec0d282735523b140e9d42c2ef3e36d1baf24 16-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Re-sync aborted jobs to shards

If a job is aborted on the master, the shards need to know, so
they can abort the job.

With this commit jobs that are already synced but have been aborted
in the meantime will be re-synced.

BUG=None
TEST=Ran suites

Change-Id: I077400047ba51b19151035f0f58c585959ceba7f
Reviewed-on: https://chromium-review.googlesource.com/218390
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
a94efe60bc94c9aa10ecfe40bddf97518985c7c2 19-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Endpoints for syncing jobs and hqes back to master

The status of jobs that were completed on a shard should be visible
in the master AFE, so a human can easily see which jobs have been run in one
central place.

This adds the functionality to the AFE to retrieve newer versions of
jobs and hqes from shards.

This is a newer version of CL:213901 which was reverted because of
http://crbug.com/418022.

BUG=418022
DEPLOY=apache, afe
TEST=Ran Suites

Change-Id: I3c9a35c78585a43d193874decbb7b16216b2c69a
Reviewed-on: https://chromium-review.googlesource.com/220141
Reviewed-by: Fang Deng <fdeng@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
e5482e5614e47a1eda238902eaa83e16a0f5475d 26-Sep-2014 Owen Lin <owenlin@chromium.org> Revert "[autotest] Endpoints for syncing jobs and hqes back to master"

This reverts commit 1b22ff2921c65b45e3727a8aaa852325f0f0cfb4.

BUG=418022

Change-Id: I30473d21d16911f620ee7f06917c13e6017f20fb
Reviewed-on: https://chromium-review.googlesource.com/219918
Reviewed-by: Owen Lin <owenlin@chromium.org>
Commit-Queue: Owen Lin <owenlin@chromium.org>
Tested-by: Owen Lin <owenlin@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
1b22ff2921c65b45e3727a8aaa852325f0f0cfb4 19-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Endpoints for syncing jobs and hqes back to master

The status of jobs that were completed on a shard should be visible
in the master AFE, so a human can easily see which jobs have been run in one
central place.

This adds the functionality to the AFE to retrieve newer versions of
jobs and hqes from shards.

BUG=None
DEPLOY=apache, afe
TEST=Ran Suites

Change-Id: I04c3401921a3f54bae6070639af805904952bf6a
Reviewed-on: https://chromium-review.googlesource.com/213901
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
82b7d1c262ff19d01ed0bc8c02911d02fbc2a148 16-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Add AFE endpoints for shard management

This adds endpoints to the AFE to create, delete and list shards.

Especially sensitive is the delete operation: All hosts and jobs
are claimed back from the shard to the master.
Hosts will be rebooted and reverified using repair. This is to ensure
no processes from the shards are still running on the DUTs, as they
could potentially interfer with upcoming tests.

BUG=None
DEPLOY=apache
TEST=Ran suites

Change-Id: Idf887452d62f37ae62771d42b7661c09e72d9a08
Reviewed-on: https://chromium-review.googlesource.com/218294
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
3b27dbc2358aef655e050a92510ff8e9e080bf81 04-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Fetching jobs from global AFE to moblab

To scale autotest with sharding jobs and hosts need to be fetched by
the shards. This adds the fetching-functionality on the shard side.

TEST=Ran suites and tried scheduling dummy on global and fetching it
DEPLOY=apache

Change-Id: I54ac73e07027e36982e18eb606cdf5958c8c6c89
Reviewed-on: https://chromium-review.googlesource.com/212725
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
7745757652d220bb746fedfdb6158d8033c288d6 23-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Don't automatically create shards in heartbeats

Shards are added and assigned to labels using atest. If they
already exist this can not be done. Therefore they must not
automatically be created on their first heartbeat. Also it makes
more sense to fail instead of silently accepting unknown heartbeats.

BUG=None
DEPLOY=apache
TEST=Ran suites.

Change-Id: Id485ad956c83c16dc96916ba58e25c6f91028dd8
Reviewed-on: https://chromium-review.googlesource.com/219423
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
59cfe5497d7f3be2bc4ade144d649a131e88448e 03-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Add heartbeat AFE endpoint to shard Autotest

To improve the workload the autotest setup can handle, jobs should
be executed by multiple shards. They are sharded by type of board.

This a HTTP accessible endpoint to AFE. This assigns jobs and hosts
to moblabs and returns them as records to insert into a shard's
local database.

TEST=Ran suites and tried manually retrieving jobs
DEPLOY=scheduler,apache,host-scheduler

Change-Id: I20ac41364e4c67e17883729181af798e18d8093e
Reviewed-on: https://chromium-review.googlesource.com/217968
Reviewed-by: Jakob Jülich <jakobjuelich@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
f88fa938050d0e2b662a2b32ef7e931e01a4d8fe 04-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Deserialize records and persist them

To send records from the master to shards it's necessary to serialize
them. This adds the deserialization functionality.

TEST=Ran suites.
DEPLOY=apache

Change-Id: I2806b0cfe1e4fbfba5d89e6d422800c7637ed4e9
Reviewed-on: https://chromium-review.googlesource.com/216355
Reviewed-by: Prashanth B <beeps@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
23b2895d2c3819a0191deab727327bcb894a0f99 13-Sep-2014 Fang Deng <fdeng@chromium.org> This is suspect to break our afe "debug" link. I am going to revert it for now.

Revert "[autotest] Add heartbeat AFE endpoint to shard Autotest"

This reverts commit 1e10d745c65ecafa79bd4f0b4f0b743bd5f1eff3.

Change-Id: I81fd554a910c8c5b7537b34ec13301fcf15be3fd
Reviewed-on: https://chromium-review.googlesource.com/217980
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
1e10d745c65ecafa79bd4f0b4f0b743bd5f1eff3 03-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Add heartbeat AFE endpoint to shard Autotest

To improve the workload the autotest setup can handle, jobs should
be executed by multiple shards. They are sharded by type of board.

This a HTTP accessible endpoint to AFE. This assigns jobs and hosts
to moblabs and returns them as records to insert into a shard's
local database.

TEST=Ran suites and tried manually retrieving jobs
DEPLOY=scheduler,apache,host-scheduler

Change-Id: Ie1dfa7bb295f685c56bb1354675d83f82d933c65
Reviewed-on: https://chromium-review.googlesource.com/211214
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
9fffe4f5092dab01ca7aff8043db49b3d308575f 15-Aug-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Make rpc_interface_unittest to use django test

The rpc_interface_unittest avoided importing rpc_utils as they need
Django to be set up, otherwise the import would fail. To do that
it contained a lot of code for mocks.

This simplifies this by using the Django unittests.

TEST=Ran suites.
DEPLOY=afe,apache

Change-Id: I63d4b9f2f098b7e10ff5520dcae217da7147cc62
Reviewed-on: https://chromium-review.googlesource.com/212508
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
71206ef92012e5a5c36bbd1ae47e9176be04036d 13-Aug-2014 Simran Basi <sbasi@chromium.org> [MobLab] Moblab Setup page.

* Adds a new page located at /moblab_setup
* 2 are on this page: 1 to upload a Boto Key and 1 to edit the config values.
* Link to /moblab_setup is visible only on a moblab system.
* RPC's that execute moblab_setup's actions are gated by a decorator that
limits them to only run on a moblab_system.
* Unittests for new RPC's.
* Editting the config values, writes the full config to shadow_config.ini and
reboots the system so changes takes effort.
* Resetting the config values, makes shadow_config.ini an empty file and
reboots the system so it is restored.
* Uploading the boto key uses shutil.copyfile to write in the new boto file's
contents to the boto file location.

BUG=chromium:396694
TEST=unittests, Uploaded a boto key and successfully ran a suite, editted
config and ensured changes were written into shadow_config, & reset config
and ensured that the default settings were restored.
DEPLOY=afe,apache
CQ-DEPEND=CL:212322
CQ-DEPEND=CL:212323
CQ-DEPEND=CL:212295

Change-Id: Ie354a2df310393045f3116e93004f58ea671de36
Reviewed-on: https://chromium-review.googlesource.com/209685
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
b6ec8ae8b13902110f664cf51e3a1d9b43c9f8f3 23-Apr-2014 Simran Basi <sbasi@chromium.org> [autotest]: Run suites from AFE.

* Updated the AFE to allow for suite runs. When an image is provided
the create_job RPC will redirect to the create_suite_job RPC instead.

* Updated create_suite_job to allow for a control_file to be supplied.
create_suite_job will use this control file rather than what the
devserver stages when it creates the suite job.

* Removed the parameterized job code from create_job as it is not used
and broken.

* The create_job page now includes a 'Pool' text box to specify for
these jobs.

BUG=chromium:358579
TEST=Able to launch suite jobs from run_suite and AFE. And regular tests
kicked off via the AFE still work as well. rpc_interface and
site_rpc_interface unittests, suite_scheduler unittests.
DEPLOY=apache,afe,suite_scheduler

Change-Id: I53312419c32740e78fc07598babeb497c162ba81
Reviewed-on: https://chromium-review.googlesource.com/194349
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
7e60574f3baa0b3928623216a74a770f19d2c316 12-Nov-2013 Simran Basi <sbasi@chromium.org> Autotest: Update RPC, Scheduler and AFE to use timeout_mins.

Now that timeout_mins is in the database, we need to update the
infrastructure to display and utilize timeout_mins rather than
timeout.

The scheduler now aborts based off of timeout_mins.

The afe displays/creates jobs using timeout_mins rather than timeout.

The RPC's take in timeout and timeout_min depending on what is inputted
to the system. Note the value supplied for timeout_mins takes precedence
over timeout.

BUG=chromium:221264
TEST=Created job through AFE, run_suite with smoke suite, job_unittest
and rpc_unittests.
DEPLOY=apache, afe, scheduler

CQ-DEPEND=I09f8b6023a31dcef37e98c298dc0d63b37bc0a9e

Change-Id: I838cd1ff85a2ce6bd49fe96bf18fd82be608c758
Reviewed-on: https://chromium-review.googlesource.com/176605
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
f0c752204cfcbb1ec0c84540cfcfbe364839a3b2 23-Oct-2013 Alex Miller <milleral@chromium.org> [autotest] Only stage test_suites in create_suite_job.

This reverts commit ecc0b7086ab66557b0009fc8d0765710fc593b41, with some
fixed unitttests.

TEST=unit
BUG=None

Change-Id: I250f3204fdd5fb0fef8a10fa6dcb27f9bd041994
Reviewed-on: https://chromium-review.googlesource.com/174246
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
139690b24c630e518bff3076e32384a69d9bfe59 08-Sep-2013 Alex Miller <milleral@chromium.org> [autotest] Accept `timeout` as an arg for create_suite_job.

And thread it through to the suite control files.

BUG=chromium:221264
TEST=unit, run_suite

Change-Id: Ibefdab2193467623c2855719d3c2061da1855b64
Reviewed-on: https://chromium-review.googlesource.com/168566
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
7d658cf6bade565c1098fd7b47075e96e7b542ca 05-Sep-2013 Alex Miller <milleral@chromium.org> [autotest] Thread priority from create_suite_job through to create_job.

This schedules a suite job itself at the same priority level of its
tests, and also injects the priority value into the suite control files.

The change to thread priority through from dynamic_suite into create_job
needs to happen concurrently, because the type of `priority` is changing
from a string to an int. This also means everything that passes in a
priority gets fixed up in this CL.

suite_scheduler has also been tweaked to schedule all tests at the
PostBuild priority (for now...).

This also does all of the work to get priority to show up by name
instead of by integral value. In the create_job pane, we disallow
anyone to schedule a job at a priority that would preempt major build
processes (anything coming from a waterfall). However, all old jobs are
shown at the integral value, because showing two seperate priority
scales at the same time would be incredibly confusing. (Especially
since URGENT would be incredibly low priority)

BUG=chromium:250583
DEPLOY=afe, apache, suite_scheduler
TEST=unit, run_suite with a priority level

Change-Id: I9ecf5ceed5c58bd8ee0815c6d15f4aba300082fe
Reviewed-on: https://chromium-review.googlesource.com/168143
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
90ac29a155461e8727c84b7734c26ba45c4741b4 21-Jun-2013 Dan Shi <dshi@chromium.org> [autotest] fix unittest with mocking devserver.url call

BUG=chromium:251879
TEST=run python site_rpc_interface_unittest.py
DEPLOY=none

Change-Id: I97e51b466efd90b49b3f968841385c97edbdf838
Reviewed-on: https://gerrit.chromium.org/gerrit/59577
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
d83ef449fc80c663ce90a3a07aa15d6c25ee08a1 17-Jan-2013 Aviv Keshet <akeshet@chromium.org> [autotest] Only integer or None as num argument in create_suite_job

Cleanup to reduce confusion and type casting back and forth between int
and string.

BUG=chromium-os:37936
TEST=unit test that non-integer or None num arguments throw appropriate
exception; unit test that integer arguments get passed along correctly;
ran a suite locally to ensure rpc call still working

Change-Id: Id8b8e0dd5a08db2ebec67cdba13b2b1d8eb0b149
Reviewed-on: https://gerrit.chromium.org/gerrit/41791
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
accb5ceaac066025592808247bfa9c97966bba97 31-Aug-2012 Chris Sosa <sosa@chromium.org> Support graceful failover/aggregation for autotest devserver pool.

This change implements the graceful failover/aggregation designed in
crosbug.com/26451. This required a large re-work of how other modules
interact with the dev_server module. Instead of always relying on being
able to pass in the "build" to any dev_server RPC, a caller must start
by using the static resolve method that resolves a build to an ip addr
and creating a DevServer instance from that hostname.

i.e.

ds = Devserver.create()
ds.trigger_download('build')

turns into

ds = ImageServer.resolve('build')
ds.trigger_download()

In order to guarantee the re-use of the same hostname throughout the life-cycle
of a suite run, we keep the hostname as part of the suitespec and also parse
the package_url based on the image_url -- not the build.

As noted, I've also separated the imaging / crash components into their
own DevServer subclasses to simplify the interaction and modified
callers.

BUG=chromium-os:26451
TEST=Unittests so far + local autotest setup with running bvt suite on one
host in the lab + ran suite_enumerator with/without -l

Change-Id: I4760e4033bb347259e3bb30f2fac31f321654c6f
Reviewed-on: https://gerrit.chromium.org/gerrit/32006
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
44e4d6ce5a7c38451c25d35b307b35338606091f 15-Aug-2012 Chris Masone <cmasone@chromium.org> [autotest] Continuing refactor of dynamic_suite code; splitting monster files!

Split the biiiiig dynamic_suite.py and dynamic_suite_unittest.py into separate
files for Reimager and Suite. Adjust imports to compensate.

BUG=chromium-os:30266
TEST=unit
TEST=successful run_suite.py run
TEST=suite_enumerator.py, suite_preprocessor.py,

Change-Id: I0457053a7ae1422970138619a64edbcfbbc338bc
Reviewed-on: https://gerrit.chromium.org/gerrit/30457
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
b493555db2d43e79d96e793cae9d1ffb822dd6c1 14-Aug-2012 Chris Masone <cmasone@chromium.org> [autotest] Move dynamic suite code into its own module

No big rewrite, just moving files around

BUG=chromium-os:30266
TEST=unit
TEST=successful run_suite.py run
TEST=suite_enumerator.py, suite_preprocessor.py, and suite_scheduler.py

Change-Id: I2fbcae0332104ce3adcb10a1e90ce94cb209aca8
Reviewed-on: https://gerrit.chromium.org/gerrit/30267
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
46d0eb11086d97db0178aa3cf316c8eb6d23c88d 28-Jul-2012 Chris Masone <cmasone@chromium.org> [autotest] Add |num| argument to create_suite_job RPC

This CL does not make any suite control file honor the argument yet.
It also does not provide a way to pass this arg from run_suite.py.

This change should drop in safely, and be a no-op to the rest of the
infrastructure. As the other changes are more likely to impact
behavior in production, I wanted to get this in on its own so we don't
churn this API a bunch with reverts and re-lands.

BUG=chromium-os:33027
TEST=use atest create suite to create a suite with the new -n arg; check the job on the AFE to see that your value got injected into the suite control file.

Change-Id: I53431b565ec6bf664baaadeca8ddd279a500f381
Reviewed-on: https://gerrit.chromium.org/gerrit/28651
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
aa10f8ed912a35f83aa9b561f3b7ccc90f655d7c 15-May-2012 Chris Masone <cmasone@chromium.org> [autotest] Gather dynamic suite constants into dynamic_suite.py

BUG=chromium-os:30351
TEST=unit tests, run_suite

Change-Id: Ia9a0d486a38aac3ab181e32563d2d3ed05b35d59
Reviewed-on: https://gerrit.chromium.org/gerrit/22875
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
e3e63a22ab0cc4e63a66ed35d367b110f82ff66a 15-May-2012 Chris Masone <cmasone@chromium.org> [autotest] Fix site_rpc_interface testStageBuildFail unittest

This was broken when I refactored some dev_server.DevServer code to raise
an exception instead of returning False.

BUG=None
TEST=unit

Change-Id: I6bdc2b63d108db384be6955fabe60218f959c9a0
Reviewed-on: https://gerrit.chromium.org/gerrit/22737
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
f8b5306840870a8ebec3a5dc4b77c0bd79a69c5b 09-May-2012 Chris Masone <cmasone@chromium.org> [autotest] Make json_rpc raise meaningful exceptions

Add some dynamic suite exceptions to client/common_lib/error.py so
that different parts of the system can all reference them. Then,
enable the json_rpc code to detect these exceptions coming back
over the wire, re-instantiate them on the client side, and raise
them.

BUG=chromium-os:30279
TEST=unit
TEST=use atest suite create to try to create a suite for a build that doesn't exist
TEST=use atest suite create to try to run a suite that doesn't exist

Change-Id: I1b6d56a7e1bdb63cc893a07581efc8decc0407f4
Reviewed-on: https://gerrit.chromium.org/gerrit/22250
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
a8066a9706027b55199b7eac573df09e20206e6b 02-May-2012 Chris Masone <cmasone@chromium.org> [autotest] Add more timing info for suites

Use job keyvals to keep track of the timing of certain
events that do not map nicely to the start/completion
of jobs. These include:
- Triggering of payload/build artifact downloads
- Completion of staging payloads
- Completion of staging build artifacts (debug symbols, etc)

BUG=chromium-os:30327
TEST=unit, run_suite and look at the glory of additional timestamps.

Change-Id: I2e8f0c148415bdbb2031616f057153b4bd9523ad
Reviewed-on: https://gerrit.chromium.org/gerrit/21578
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
6b288c89dfcc112f605854bd5563b70ee5d74006 30-Mar-2012 Chris Sosa <sosa@chromium.org> Modify dynamic suite pathway to allow some artifacts to be staged in the bgnd.

This change modifies the site_rpc_interface->dynamic_suite.py workflow to allow
autotest to stage larger build components while imaging devices. It uses
the download/wait_for_status interface provided by the devserver to
accomplish it.

BUG=chromium-os:27285
TEST=All effected unittests pass. Staging larger test on local devserver in
parallel.

Change-Id: Iae2a20762c565b8e6d440c9a501c1f99c73129ed
Reviewed-on: https://gerrit.chromium.org/gerrit/19328
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Scott Zawalski <scottz@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
62579122694934d942a4844a615bc034bc2e8aa1 09-Mar-2012 Chris Masone <cmasone@chromium.org> [autotest] Pipe check_hosts parameter down into dynamic_suite

The builders need to schedule a test suite and then wait for it to
complete. They probably want to check to make sure the suite can be
scheduled, and error out if not. That's great. For suites that we
schedule once a day or asynchronously in some other way, we probably
don't want to bail just because the testbed has too many hosts that
need Repair or something. We want to fire and forget.

To support these two modes of operation, pipe a 'check_hosts' paramter
all the way from the create_suite_job() RPC, down through control
files, all the way to dynamic_suite.reimage_and_run(). Ensure that we
tolerate check_hosts being left unset in reimage_and_run(). Also,
make 'atest suite create' able to toggle this value.

BUG=chromium-os:27526
TEST=dynamic_suite_unittest.py, site_rpc_interface_unittest.py
TEST=./server/autoserv test_suites/dev_harness with check_hosts set both ways.
TEST=install the patch on an autotest instance, and re-run a test suite against the new interface. The suite should check for hosts and behave appropriately.

Change-Id: I10c3f42dbc37f26d7af3c40439ce212ebf74cfcd
Reviewed-on: https://gerrit.chromium.org/gerrit/17633
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py
859fdecd96355279570007849d8bc46ff71874d7 30-Jan-2012 Chris Masone <cmasone@chromium.org> [autotest] Add create_suite_job() site RPC.

Add create_suite_job() RPC to autotest using the site_rpc mechanism.
Also add support to atest to call this RPC.

The purpose of this RPC is to stage a build on the dev server (if
necessary), image N machines with it, and then run the desired
suite on those machines.

BUG=chromium-os:25573
TEST=atest suite create -b x86-mario -i x86-mario-release/R19-1675.0.0-a1-b1588 test_suites/control.dummy

Change-Id: I09288fe6ffc675e5b111f7f59e349015f52ebb8e
Reviewed-on: https://gerrit.chromium.org/gerrit/15279
Tested-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/frontend/afe/site_rpc_interface_unittest.py