New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 714813 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature

Blocked on:
issue 749200



Sign in to add a comment

Record DUT serial numbers in the AFE database

Reported by jrbarnette@chromium.org, Apr 24 2017

Issue description

In order to provide better tracking of the lab inventory,
we'd like to gather the serial number and HWID of every
DUT in the AFE host database.  The following is sufficient
to solve the problem:
  * Add a verifier to verify() that asks the DUT for the
    information.
  * Takes the information from the DUT, and adds it to the
    host attributes in the database.

Caveats:  Not every DUT will have valid information.  The
verifier will need some sanity checking, and the ability
to record when the attributes are invalid.

 
Cc: textor@chromium.org

Comment 2 by aut...@google.com, Apr 25 2017

Labels: -Type-Bug Type-Feature

Comment 3 by aut...@google.com, Apr 26 2017

Aviv - any luck on getting an owner for this? 
No, been prioritizing CQ health.

jrbarnette@ what's the command line to "ask the DUT for the information"? If that is spelled out here this bug becomes pretty easy to squash (probably).
To get HWID, run this command:
    crossystem hwid

To get the serial number run this command:
    vpd -g serial_number

Comment 6 by aut...@google.com, May 16 2017

do we have an owner for this work yet?
Wanted to check in again to see if we have a owner for this? 
Labels: -Pri-2 Hotlist-Fixit Pri-1
We have a fixit week coming up in two weeks, pumping priority so it gets picked up for fixit week.

Comment 9 by xixuan@chromium.org, Jun 21 2017

Owner: xixuan@chromium.org
Status: Started (was: Available)
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/75f0c709f07453c51b6db0e1a2e79a1a58ce8b4f

commit 75f0c709f07453c51b6db0e1a2e79a1a58ce8b4f
Author: xixuan <xixuan@chromium.org>
Date: Thu Jul 20 07:37:04 2017

autotest: Add verifier for checking HWID & Serial Number for host.

BUG= chromium:714813 
TEST=Ran verify in local autotest and Ran pure code locally.
Ran unittest.

Change-Id: Id75a396b9e9dd33e8b7a55f4adc50724547cc501
Reviewed-on: https://chromium-review.googlesource.com/544337
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>

[modify] https://crrev.com/75f0c709f07453c51b6db0e1a2e79a1a58ce8b4f/server/hosts/cros_repair_unittest.py
[modify] https://crrev.com/75f0c709f07453c51b6db0e1a2e79a1a58ce8b4f/server/hosts/cros_repair.py

The code change appears to be updating the shards, but not the master:

$ atest host stat chromeos2-row7-rack6-host21 | awk 'printing {print} /Attributes/ {printing = 1}'
powerunit_outlet : .A21
powerunit_hostname : chromeos2-row7_8-rack6-rpm2
servo_host : chromeos2-row7-rack6-host21-servo
servo_port : 9999
$ atest host stat -w chromeos-server110.mtv chromeos2-row7-rack6-host21 | awk 'printing {print} /Attributes/ {printing = 1}'
HWID : REEF E25-C3A-T2Y-U2F-B64-A2V
servo_host : chromeos2-row7-rack6-host21-servo
powerunit_hostname : chromeos2-row7_8-rack6-rpm2
serial_number : H3NTCX000755125
servo_port : 9999
job_repo_url : http://100.115.245.198:8082/static/reef-paladin/R62-9775.0.0-rc3/autotest/packages
powerunit_outlet : .A21

Blockedon: 479200
Blockedon: -479200 749200
Status: Fixed (was: Started)

Sign in to add a comment