History log of /external/autotest/site_utils/lab_inventory.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
222d7f49a74cac0a95b48a95f93a61934c332311 15-Dec-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Add the 'continuous' pool to lab inventory management.

We're creating a new pool named 'continuous' that will be used by
certain continuous Chrome builders in order to improve the gardening
process. Those pools will be treated the same as the 'bvt' and 'cq'
pools for inventory management purposes.

BUG=chromium:569743
TEST=None

Change-Id: I2f056d32d80a2d5d739cf7a59a156a4e40fa7ed0
Reviewed-on: https://chromium-review.googlesource.com/317985
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/site_utils/lab_inventory.py
aa8689388ab9b48b1236e985476897d2781f91f3 23-Oct-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Add assign_stable_images.py to site_utils.

This adds a new tool for automatically selecting and updating stable
test images. The tool will guarantee that no managed board in the
lab will use an image older than the current Beta channel build
that's being served by Omaha for that board.

BUG=chromium:532654
TEST=Run with --dry-run; test once w/ prod

Change-Id: I6ec9484ef0a135429bf36cda99696a97e2ce74f9
Reviewed-on: https://chromium-review.googlesource.com/308555
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/lab_inventory.py
e39c827129e2a906eecbab6a6872da10ef8262bc 21-Oct-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Change to get_managed_boards() in lab inventory.

Previously, the _LabInventory class contained a `get_board_counts()`
method that returned a list of tuples for selected boards. That
interface was bad both for readability and reusability.

This change replaces the bad API with a method called
`get_managed_boards()` that returns just a set of the boards that
wer of interest in the old `get_board_counts()` API. Callers of
the method and the associate unit tests have been adjusted for the
change.

BUG=None
TEST=unit tests, plus selected lab_inventory --debug invocations

Change-Id: Iafcf7fe36984fe1a806337417536d541b3d1dfcf
Reviewed-on: https://chromium-review.googlesource.com/307592
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
d3ba33a890a71b2ffd27a69e837a15ffc8df984b 14-Oct-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Add aggregate statistics to board inventory.

In lab_inventory, add numbers for aggregate statistics for
good and bad DUTs, and for the number of boards. A sample
of the new output:

Summary of DUTs in inventory:
Bad Good Total
8 14% 52 86% 60

Boards with failures: 3
Boards in inventory: 4

BUG=None
TEST=unit tests, and various sample runs with --debug

Change-Id: Iec925a819c6618f5ae80498f2f4ad230757f4719
Reviewed-on: https://chromium-review.googlesource.com/305566
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
55127430374f9e2801e1ccee3f22806c18182b85 14-Oct-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] For lab inventory, don't recommend non-inventory boards

The regular board inventory excludes boards that have no suites
pool, or that have only suites DUTs. However, when we create a list
of DUTs for repair, we don't honor those exclusions. The result is
that in some cases, we recommend DUTs for repair when the board
isn't listed in the inventory.

This change makes the repair recommendations be drawn only from
the boards that are part of the regular inventory.

BUG=None
TEST=unit tests, plus selected testing w/ --debug

Change-Id: I0dfbd060193afbd9dd08d646151e598a9b8c0d5f
Reviewed-on: https://chromium-review.googlesource.com/305398
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Paul Hobbs <phobbs@google.com>
/external/autotest/site_utils/lab_inventory.py
02e824301c65af31cfbebd5e4a3cb21bfc27cd82 14-Oct-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Slight improvement to debug options for lab_inventory

This renames the --print option to --debug, and allows for testing
the individual --board-summary and --pool-summary (instead of always
executing both options when --debug is present).

BUG=None
TEST=unit tests

Change-Id: If4068f56bbb03833d1005207d7a1f73fb0b82f0b
Reviewed-on: https://chromium-review.googlesource.com/305584
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
a7c514e6ea729e86909089cb84819f5252f8e261 15-Sep-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Use a RetryingAFE for lab_inventory.

We get periodic 500 errors from cautotest due to load. So,
retry the RPC calls.

BUG=chromium:498883
TEST=run an inventory sample locally

Change-Id: If9d7258f3d7a28b13b74b4edfe4142f4f4bcd707
Reviewed-on: https://chromium-review.googlesource.com/299559
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/lab_inventory.py
056d74ca9da956940c742be383a65d51ad456b55 14-Jul-2015 Aviv Keshet <akeshet@chromium.org> lab_inventory: clarify email message

BUG=None
TEST=None

Change-Id: I758b740cd50e392233645c723adf636d10f4b8dc
Reviewed-on: https://chromium-review.googlesource.com/285313
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
/external/autotest/site_utils/lab_inventory.py
1df6a568e8dc3fa59725043147177e89934583cb 09-Jun-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Merge DUT repair recommendations with board inventory.

Based on discussions with englab-sys-cros, this merges the
DUT repair recommendations with the full board inventory e-mail.

After the change, there are two distinct kinds of inventory
runs:
* run-pool-inventory generates a pool inventory e-mail sent to the
deputies, and generates the combined board and DUT repair
recommendations e-mail for the englab team.
* run-board-inventory generates a board inventory only, without
repair recommendations, and sends it to the englab team.

BUG=None
TEST=run locally, examine the output

Change-Id: Ifc03560b637884f3abbfcd6561f614a9d2de7005
Reviewed-on: https://chromium-review.googlesource.com/276800
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
1f87ee1890281d13c5185f58179756fd5d4b8256 09-Jun-2015 Richard Barnette <jrbarnette@chromium.org> Revert "[autotest] Merge DUT repair recommendations with board inventory."

This reverts commit 6e9a6b487dc921d9ee6cdc1d13bdf534d70c6680.

This won't do what I meant:
* It breaks the current cron job, because it deletes an option that's
still in use.
* It includes repair recommendations unconditionally, but really,
we only want them first thing in the morning.

Change-Id: I8a095be5cbeb3656f47af799a89ac01a6ff1438b
Reviewed-on: https://chromium-review.googlesource.com/276462
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
6e9a6b487dc921d9ee6cdc1d13bdf534d70c6680 09-Jun-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Merge DUT repair recommendations with board inventory.

Based on discussions with englab-sys-cros, this merges the
DUT repair recommendations with the full board inventory e-mail.

BUG=None
TEST=run locally, examine the output

Change-Id: Ie12b7defbabc6c4b72cb553837005153e514f46b
Reviewed-on: https://chromium-review.googlesource.com/276269
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
c9a143caf0a60024c86bdf15ca00becf58bde794 04-Jun-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Improve the pool inventory message.

Based on feedback from a recent deputy, change the pool inventory
message in site_utils/lab_inventory.py to make the expectations
clearer.

BUG=None
TEST=unit tests

Change-Id: I614f7f4a3c0a2095ea4973c1512ebcedae6bde1f
Reviewed-on: https://chromium-review.googlesource.com/275293
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
f683928724acf6dc20e365b048c09f20dc826d0a 02-Jun-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Provide a repair recommender for lab inventory.

This enhances the lab_inventory script to include a feature that
will recommend a list of hosts for repair. The hosts are selected
so that they are (somewhat) close together, and all hosts are
guaranteed to reside in the same lab. The selection is also
designed to try and improve the inventory numbers by focusing
on the boards that have the lowest number of working spares.

BUG=None
TEST=unit tests; various tests with --print; full run w/ e-mail

Change-Id: Ie9863ce337045a3fdd6d8d649613dda830fae7f0
Reviewed-on: https://chromium-review.googlesource.com/274541
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
f60a1eec59298077bc30340ef473e50402759e4f 02-Jun-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Adjust the lab_inventory pool inventory message.

The message referred to `freon_swap`, which is now obsolete.

BUG=chromium:492264
TEST=unit tests

Change-Id: Ia5f8eaab85566872ff88ab186e4fe2540be00ed8
Reviewed-on: https://chromium-review.googlesource.com/274810
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/lab_inventory.py
6948ed3288dc7a363671e711f6a68c594d589153 06-May-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] In lab inventory, ignore DUTs with no board.

From time to time (twice so far), we've had cases of hosts being
added to the database with a pool: label, but no board: label.
That caused failures when gathering inventory, because
status_history.HostJobHistory assumed (without particular
justification) that every board has board: and pool: labels,
and nowhere was there a check to deal with it.

This changes the code so that the host_board and host_pool
properties in HostJobHistory will return `None` when there's no
appropriate label, and changes lab inventory gathering to skip hosts
with no board label.

BUG=chromium:480026
TEST=Unit tests

Change-Id: Ic1065a34ba0e4a2d2019bf8ea89507b277499af6
Reviewed-on: https://chromium-review.googlesource.com/269609
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
3d0590adb50cd0af0c53007c64eeaa6cddfbf5e9 29-Apr-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] In status_history, convert some methods to properties.

This converts HostJobHistory.get_host_board() and get_host_pool()
to @property methods. Also add a new host property.

BUG=None
TEST=run unit tests

Change-Id: I42f8d0792ee7f83655581225584e86ea3065cd08
Reviewed-on: https://chromium-review.googlesource.com/268350
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
4845fcf1c09c076279f816cfa039a54e943bd337 20-Apr-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Update the pool inventory e-mail message.

This adds instructions for the Infrastructure deputy to the pool
inventory e-mail to make required actions clearer, and updates the
unit tests with a sanity check to see that the instructions are
there.

BUG=None
TEST=unit tests, run for one board and inspect the logs

Change-Id: I7e96dca03d5d5e4ae699bcaf7a5c053a86e73e61
Reviewed-on: https://chromium-review.googlesource.com/266517
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py
96db349a945e8a595567223840271f1e6a5412b5 28-Mar-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Create lab_inventory for inventory cron jobs

This converts the core of the run-board-inventory and
run-pool-inventory scripts to python. The new scripts produce
output that is largely similar, but not identical to the old
bash scripts.

The scripts provide some performance advantage, and some flexibilty:
The bash scripts needed >75 minutes to generate board inventory; the
new python script can generate pool and board inventories at the
same time, and finishes in ~30 minutes.

BUG=None
TEST=unit tests, plus full command-line against cautotest

Change-Id: Id4f5443d7efb8b538bfe4453256201cce2f81bcf
Reviewed-on: https://chromium-review.googlesource.com/263594
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/site_utils/lab_inventory.py