aboutsummaryrefslogtreecommitdiff
path: root/lock_machine.py
AgeCommit message (Collapse)Author
2020-05-04lock_machine: slightly adjust lease durationGeorge Burgess IV
When trying to lock a skylab machine, I got the following error: ``` Lease duration (1440 minutes) cannot exceed 1 day [1440 minutes] ``` Though our lease duration doesn't _exceed_ one day, it's easy enough to drop it by one minute to make the error go away. BUG=None TEST=Ran crosperf Change-Id: I75c11de1a70e46f75a50c5022f6b4860c0338c1f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2177065 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2020-05-04lock_machine: look up skylab on $PATHGeorge Burgess IV
Not all cipd installations go into /usr/local/bin/. Chrotomation3 appears to have it on its path: mobiletc-prebuild@chrotomation3:~/$ which skylab /usr/local/bin/skylab So this should be a nop, and should be more flexible for people who want to have their cipd bits elsewhere. BUG=None TEST=ran crosperf Change-Id: If0aae16f123ac23dd015b3bf879c899e06e20901 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2177064 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2020-05-04lock_machine: shout when our `swarming` command diesGeorge Burgess IV
When I tried to run crosperf without proper `swarming.py` authentication, crosperf said the machine I wanted to use wasn't available in skylab. It'd be better if we reported that we couldn't tell if the machine was/wasn't in skylab due to the tool we're using failing. Looks like this script can fail for a number of other reasons, too, so throwing our hands up is likely going to often be our best bet. BUG=None TEST=ran without auth; exception was thrown. ran with; things worked. Change-Id: I4d0e4ec70eddb3a7836686eef819e6175a730756 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2177063 Reviewed-by: Bob Haarman <inglorion@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2020-04-16toolchain-utils: provide option to migrate nightly tests to recipezhizhouy
This patch provides two new options to buildbot_test_toolchain script, which launches nightly performance tests for toolchain. Option `--recipe` introduces new location and mechanism to find latest image from recipe bucket. The recipe builder for each board monitored by toolchain team builds an image every day and store results to certain gs locaton. When this option specified, the script no longer launches tryjob to get a new image but tries to access the lastest existing image in the last two days from the gs location. Option `--test` makes it easier to test locally, it blocks all locations in chrotomation machine and do not send or store unnecessary results after tests finish. A small change to lock_machine.py fixes an issue while related to swarming when testing this change. BUG=chromium:1071271 TEST=./buildbot_test_toolchains.py --board=lulu --remote=chromeos2-row9-rack8-host7.cros --chromeos_root=$chromiumos --test=True --recipe=True Change-Id: I724a31ce174955c1f002bb7e330919f23535e105 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2151717 Reviewed-by: Tiancong Wang <tcwang@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com> Commit-Queue: Zhizhou Yang <zhizhouy@google.com>
2020-02-14toolchain-utils: fix cros lint and some random errorsZhizhou Yang
We have enabled --py3 for cros lint and thus reveals some new linting errors in migrated scripts. This patch fixes them and some other random errors. BUG=chromium:1011676 TEST=Passed unittests. Change-Id: If129e01c21845e1b944a2b64e50e9fed7138c845 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2055972 Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
2020-02-13crosperf: change skylab credential location in sheriff_utilsZhizhou Yang
The location of skylab credential file has been changed in sheriff_utils, and this patch will use the new location. BUG=chromium:1046413 TEST=Tested on chrotomation3 Change-Id: I987c0828c36538ad5c1c05e15e276e45275a6d36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2053244 Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2020-01-30crosperf: migration to python 3Zhizhou Yang
This patch migrates crosperf and its utils to python 3. TEST=Passed presubmit check; tested with simple experiment locally. BUG=chromium:1011676 Change-Id: Ib2a9f9c7cf6a1bb1d0b42a1dd3d9e3cbb4d70a36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2003796 Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
2020-01-24crosperf: remove AFE server interactionsZhizhou Yang
This patch removes afe locking mode for crosperf, since: 1) All lab machines has been migrated to skylab. 2) Interaction with afe depends on python 2 code in autotest. BUG=chromium:1044764 TEST=Passed unittest and simple experiment run. Change-Id: Ie0a250548d739f32bbc08619f637380104df6c28 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2016008 Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-10-30toolchain-utils: change lease time limit for skylabZhizhou Yang
Currently we are leasing at most 10 hours for skylab DUTs, which could not cover the run time nightly tests take on specific machines. We temporarily increase this timeout so that skylab not release it before we finishes the test. BUG=chromium:1019439 TEST=None Change-Id: I092159f48cebb17a3e130c580279422200d0fe01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1888298 Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
2019-10-15toolchain-utils: change naming related to AFE lockZhizhou Yang
After introducing the new locking mechanism, the behavior of AFELockManager totally changed. This file changed the naming of all related code in toochain-utils. This patch also changed the behavior of locks_dir option, deprecated the use_file_lock option explicitly. TEST=Tested with different DUT types. BUG=chromium:1006434 Change-Id: Ib15efce54ec4d4c5c2a18fecca3f350248462035 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1863530 Reviewed-by: Caroline Tice <cmtice@chromium.org> Reviewed-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com>
2015-06-10Implement new global locking scheme for machines.cmtice
This CL implements a new machine locking mechanism using Autotest Front End servers. When locking/unlocking a lab machine, it uses the ChromeOS HW lab server; when locking/unlocking a local machine, it uses a local AFE server on chrotomation2. BUG=None TEST=Tested the script manually to lock/unlock machines and query status. Also tested with image_chromeos and with crosperf scripts. Change-Id: I2793bc1f7dc056e725694e81ded656d9f49d227b Reviewed-on: https://chrome-internal-review.googlesource.com/217560 Reviewed-by: Luis Lozano <llozano@chromium.org> Reviewed-by: David Sharp <dhsharp@google.com> Tested-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com>
2013-08-07Initialize machine_id_checksum. Make unlocking unlocked machine a warning.Caroline Tice
Fix issues causing errors in nightly tester: Attempting to use machine_id_checksum when it hasn't been initialized; and attempting to unlock an already unlocked machine causes a fatal error. Change-Id: Ia149953d4e25c7abf97a189bb5fdd129de865c34 Reviewed-on: https://gerrit-int.chromium.org/42489 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-03-15Cleaned up directory after copy of tools from perforce directoryLuis Lozano
Got rid of stale copies of some tools like "crosperf" and moved all files under v14 directory (that came from perforce) into the top directory. BUG=None TEST=None Change-Id: I408d17a36ceb00e74db71403d2351fd466a14f8e Reviewed-on: https://gerrit-int.chromium.org/33887 Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org>
2013-03-15Removed duplicated lock_machine.py file.Luis Lozano
BUG=none TEST=none Change-Id: I7e2592db8a49138aa54c5270dc4e171fee1ba410 Reviewed-on: https://gerrit-int.chromium.org/33885 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org>
2012-12-20Synced repos to: 64740Ahmad Sharif
2012-02-02Synced repos to: 58208Ahmad Sharif