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

Issue 901205 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 866062



Sign in to add a comment

Package up everything needed to run `cros flash` on a chromium bot in a recipe (or isolate)

Project Member Reported by bpastene@chromium.org, Nov 2

Issue description

This'll be used for the auto-flashing part of bug 866062.

Going to attempt to write a recipe that takes care of:
- fetching a chromeos checkout
- building the chroot
- running `cros flash`

That recipe will run on our cros DUT swarming bots. I'd like to use a recipe since it's a series of discrete steps, each of which need to place their inputs/outputs in a persistent dir for reusability. (Checking out & building from a clean slate will take ~1 hour, doing it from a warm cache should take ~minutes.) Since we'll be flashing the duts nightly, this needs be as quick as possible.

The only issue is that the recipe will run on bots that are also running vanilla test tasks (ie: *not* recipes). Might be kinda weird. Who knows what bumps I'll run into. +robbie who was giving me some tips about that
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a01edc9b8c7543d3940aa60b6278f31511903dc8

commit a01edc9b8c7543d3940aa60b6278f31511903dc8
Author: Ben Pastene <bpastene@chromium.org>
Date: Fri Nov 02 18:09:04 2018

Add an experimental cros-dut-flash builder to buildbucket-dev.

Its bots will be everything in:
https://chromium-swarm-dev.appspot.com/botlist?c=id&c=os&c=task&c=status&f=os%3AChromeOS&l=100&q=os%3AChr&s=id%3Aasc

Bug:  901205 
Change-Id: I0266b1c75deacdd0b287bcd9cc7f8b247a4792af
Reviewed-on: https://chromium-review.googlesource.com/c/1313836
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604984}
[modify] https://crrev.com/a01edc9b8c7543d3940aa60b6278f31511903dc8/infra/config/global/cr-buildbucket-dev.cfg

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/8615c92d5cf6bb3527a587416deb4d4f79dfa8b1

commit 8615c92d5cf6bb3527a587416deb4d4f79dfa8b1
Author: Ben Pastene <bpastene@chromium.org>
Date: Fri Nov 02 18:56:37 2018

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f7f4dafa44db94899385302cd7722d57ff43a38f

commit f7f4dafa44db94899385302cd7722d57ff43a38f
Author: Ben Pastene <bpastene@chromium.org>
Date: Fri Nov 02 19:00:30 2018

Add os:ChromeOS dimension to experimental buildbucket cros-flash builder.

And remove cpu:x64 from the defaults.

TBR=jbudorick

Bug:  901205 
Change-Id: I64be7685d85a2b5d895dafde6df0193b8db0c6bf
Reviewed-on: https://chromium-review.googlesource.com/c/1315693
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605001}
[modify] https://crrev.com/f7f4dafa44db94899385302cd7722d57ff43a38f/infra/config/global/cr-buildbucket-dev.cfg

I got a POC of recipe finished that successfully flashes a DUT on one of our bots:
https://chromium-swarm-dev.appspot.com/task?id=40f01046f837cd10

There's a few requirements it has about needing password-less sudo (since it's using a cros checkout). Since the bots are running inside containers, this shouldn't be too much of a problem. Theoretically I can give the entire bot root access to the whole container... I just need to clean up the mount points:
https://chromium.googlesource.com/infra/infra/+/master/infra/services/swarm_docker/containers.py#15

I think I can get rid of most of them, but "/creds/service_accounts" and "/home/chrome-bot" worry me. I'll play around w/ it.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 6

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infra/puppet/+/682894817edea3ac5bd5bfe5547842fd06ba8d30

commit 682894817edea3ac5bd5bfe5547842fd06ba8d30
Author: Ben Pastene <bpastene@chromium.org>
Date: Tue Nov 06 01:24:45 2018

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 6

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/757ff0248c6dd8a70d6db5aea04f2079a1bbc9dc

commit 757ff0248c6dd8a70d6db5aea04f2079a1bbc9dc
Author: Ben Pastene <bpastene@chromium.org>
Date: Tue Nov 06 02:16:55 2018

Launch cros_docker containers with elevated privileges.

Needed to build the cros chroot. (It does cgroup modifications/creations
that fail without elevated privileges.)

R=jbudorick

Bug:  901205 
Change-Id: I79c21d48af73f1dcd4918c82a2f8f5fda2f1fb0a
Reviewed-on: https://chromium-review.googlesource.com/c/1318724
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Auto-Submit: Ben Pastene <bpastene@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#18801}
[modify] https://crrev.com/757ff0248c6dd8a70d6db5aea04f2079a1bbc9dc/infra/services/swarm_docker/containers.py
[modify] https://crrev.com/757ff0248c6dd8a70d6db5aea04f2079a1bbc9dc/infra/services/cros_docker/test/containers_test.py
[modify] https://crrev.com/757ff0248c6dd8a70d6db5aea04f2079a1bbc9dc/infra/services/cros_docker/containers.py

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/3824aae0c1930f727677caaa342a5881e894ff63

commit 3824aae0c1930f727677caaa342a5881e894ff63
Author: Ben Pastene <bpastene@chromium.org>
Date: Fri Nov 09 18:47:57 2018

Add a recipe that can flash a CrOS DUT on a chromium swarming bot.

This'll be run on swarming bots regularly to flash their DUTs.

Tested w/ led:
https://chromium-swarm-dev.appspot.com/task?id=40f01046f837cd10

Bug:  901205 
Change-Id: I5ecfe88cd5724864d390bedfde0bef0aa27b15e9
Reviewed-on: https://chromium-review.googlesource.com/c/1318214
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Stephen Martinis <martiniss@chromium.org>

[add] https://crrev.com/3824aae0c1930f727677caaa342a5881e894ff63/scripts/slave/recipes/cros_flash.expected/basic_test_with_extract.json
[add] https://crrev.com/3824aae0c1930f727677caaa342a5881e894ff63/scripts/slave/recipes/cros_flash.expected/basic_test.json
[modify] https://crrev.com/3824aae0c1930f727677caaa342a5881e894ff63/scripts/slave/recipe_modules/chromite/api.py
[add] https://crrev.com/3824aae0c1930f727677caaa342a5881e894ff63/scripts/slave/recipes/cros_flash.expected/missing_props.json
[modify] https://crrev.com/3824aae0c1930f727677caaa342a5881e894ff63/scripts/slave/README.recipes.md
[add] https://crrev.com/3824aae0c1930f727677caaa342a5881e894ff63/scripts/slave/recipes/cros_flash.expected/unknown_image_format.json
[add] https://crrev.com/3824aae0c1930f727677caaa342a5881e894ff63/scripts/slave/recipes/cros_flash.py

Status: Fixed (was: Assigned)
Recipe's in. Should be g2g.

Sign in to add a comment