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

Issue 741564 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Factory: Extract CRX cache from cros_payloads folder.

Project Member Reported by hungte@chromium.org, Jul 12 2017

Issue description

Currently factory wiping relies CRX cache being preserved on statful partition, however when cros_payload was introduced, we did keep a copy of the partition in /mnt/stateful_partition/cros_payloads/release_image.1

I think in wiping we should add a step to keep that somewhere, and restore after clobber-state (or newfs).
 

Comment 1 by hungte@chromium.org, Jul 12 2017

BTW, factory_install.sh already had a special hack for this but I think we'll need to move that to wiping or as a standalone test (or even init) since copy machine also needs same process.

Comment 2 by hungte@chromium.org, Jul 12 2017

Another solution is to mount, extract and archive into a new tar in installation time. 

However if someone uses test image as release image, extracting the partition may fill up tmpfs or stateful parititon on disk.

Maybe we should still do this inside cros_payload: when imported, try to mount stateful partition and re-tar the unencrypted/ folder, and put that as one of the resource under release_image.

Comment 3 by hungte@chromium.org, Jul 12 2017

Cc: youcheng@chromium.org
Owner: hungte@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 13 2017

Labels: merge-merged-factory-eve-9667.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/2b6c7d5c081d794ca440c7d85411734550fb5693

commit 2b6c7d5c081d794ca440c7d85411734550fb5693
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jul 13 04:24:07 2017

cros_payload: Add a *_image.crx_cache sub component.

The CRX cache in stateful partition may be pretty small, but if we want
to fetch that outside creation of payloads, the clients will need to
first download entire partition, uncompress, mount and copy from the
mounted directory. This is causing problems when developers are using
test images as release image, since the stateful partition will be
pretty huge.

As a result, the more reasonable approach is to build a new sub
component, 'crx_cache', when adding *_image resources.

BUG= chromium:741564 
TEST=./cros_payload add test.json release_image PATHTO/chromiumos_image.bin
     make test; setup/cros_docker.sh umpire test

Change-Id: I96afa6d5b7a0dfb9b667fe14e4ae63401ca98e82
Reviewed-on: https://chromium-review.googlesource.com/569545
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Trybot-Ready: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/2b6c7d5c081d794ca440c7d85411734550fb5693/setup/make_factory_package.sh
[modify] https://crrev.com/2b6c7d5c081d794ca440c7d85411734550fb5693/sh/cros_payload.sh

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/9a6a81c1d7287d672c63465481fda54215fea374

commit 9a6a81c1d7287d672c63465481fda54215fea374
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jul 13 07:56:53 2017

cros_payload: Add a *_image.crx_cache sub component.

The CRX cache in stateful partition may be pretty small, but if we want
to fetch that outside creation of payloads, the clients will need to
first download entire partition, uncompress, mount and copy from the
mounted directory. This is causing problems when developers are using
test images as release image, since the stateful partition will be
pretty huge.

As a result, the more reasonable approach is to build a new sub
component, 'crx_cache', when adding *_image resources.

BUG= chromium:741564 
TEST=./cros_payload add test.json release_image PATHTO/chromiumos_image.bin
     make test; setup/cros_docker.sh umpire test

Change-Id: I96afa6d5b7a0dfb9b667fe14e4ae63401ca98e82
Reviewed-on: https://chromium-review.googlesource.com/567916
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Trybot-Ready: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/9a6a81c1d7287d672c63465481fda54215fea374/setup/make_factory_package.sh
[modify] https://crrev.com/9a6a81c1d7287d672c63465481fda54215fea374/sh/cros_payload.sh

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/abe1567f8df16b390ea15ce86c2c5268bcadaffe

commit abe1567f8df16b390ea15ce86c2c5268bcadaffe
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jul 13 13:51:36 2017

factory_install: Use new 'crx_cache' cros_payload sub component.

It may be not possible to download whole stateful partition from
release_image if a test image was given. The new 'crx_cache'
subcomponent allows getting CRX cache directly (usually ~10M).

BUG= chromium:741564 
TEST=None

Change-Id: Ia56b29da6e7de9210f3d5f415caedea1a848451b
Reviewed-on: https://chromium-review.googlesource.com/568058
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>

[modify] https://crrev.com/abe1567f8df16b390ea15ce86c2c5268bcadaffe/factory_install.sh

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/7c265df82c6d59f85385071b2fca4925a297b981

commit 7c265df82c6d59f85385071b2fca4925a297b981
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jul 13 14:53:21 2017

factory_install: Use new 'crx_cache' cros_payload sub component.

It may be not possible to download whole stateful partition from
release_image if a test image was given. The new 'crx_cache'
subcomponent allows getting CRX cache directly (usually ~10M).

BUG= chromium:741564 
TEST=None

Change-Id: Ia56b29da6e7de9210f3d5f415caedea1a848451b
Reviewed-on: https://chromium-review.googlesource.com/568058
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>
(cherry picked from commit abe1567f8df16b390ea15ce86c2c5268bcadaffe)
Reviewed-on: https://chromium-review.googlesource.com/569946
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Trybot-Ready: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/7c265df82c6d59f85385071b2fca4925a297b981/factory_install.sh

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/fb04ad0237f10d07263175337630dd67024a8d08

commit fb04ad0237f10d07263175337630dd67024a8d08
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jul 13 17:26:49 2017

gooftool: Restore CRX cache in wiping.

After wiping, we have to restore the cached CRX files from release image
stateful partition (already prepared by cros_payload as component
'release_image.crx_cache').

BUG= chromium:741564 
TEST=manually tested: gooftool wipe_in_place

Change-Id: I5db6689a952ea3f6af33b84b1251c0de33c021df
Reviewed-on: https://chromium-review.googlesource.com/569844
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Trybot-Ready: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/fb04ad0237f10d07263175337630dd67024a8d08/py/gooftool/wipe.py

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/dd3425d3ead6532f9152838844259221d5b2a0de

commit dd3425d3ead6532f9152838844259221d5b2a0de
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Jul 14 00:30:40 2017

gooftool: Restore CRX cache in wiping.

After wiping, we have to restore the cached CRX files from release image
stateful partition (already prepared by cros_payload as component
'release_image.crx_cache').

BUG= chromium:741564 
TEST=manually tested: gooftool wipe_in_place

Change-Id: I5db6689a952ea3f6af33b84b1251c0de33c021df
Reviewed-on: https://chromium-review.googlesource.com/568061
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>

[modify] https://crrev.com/dd3425d3ead6532f9152838844259221d5b2a0de/py/gooftool/wipe.py

Status: Fixed (was: Started)
Project Member

Comment 11 by bugdroid1@chromium.org, Aug 1 2017

Labels: merge-merged-factory-gru-9017.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/7e0b0e64ca4e2a824293887ac8dd1211ddb9c316

commit 7e0b0e64ca4e2a824293887ac8dd1211ddb9c316
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Aug 01 00:54:35 2017

factory_install: Use new 'crx_cache' cros_payload sub component.

It may be not possible to download whole stateful partition from
release_image if a test image was given. The new 'crx_cache'
subcomponent allows getting CRX cache directly (usually ~10M).

BUG= chromium:741564 
TEST=None

Change-Id: Ia56b29da6e7de9210f3d5f415caedea1a848451b
Reviewed-on: https://chromium-review.googlesource.com/568058
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>
(cherry picked from commit abe1567f8df16b390ea15ce86c2c5268bcadaffe)
Reviewed-on: https://chromium-review.googlesource.com/594704
Reviewed-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>

[modify] https://crrev.com/7e0b0e64ca4e2a824293887ac8dd1211ddb9c316/factory_install.sh

Comment 12 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment