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

Issue 707164 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

factory: safer, faster, and better factory_restart

Project Member Reported by hungte@chromium.org, Mar 31 2017

Issue description

Currently, "factory_restart -a" wipes everything.

However, when we're doing fault analysis in manufacturing line, we often try to reload test list (or other stuff) by running "factory_restart -a", which unfortunately removes everything.

The suggestion is to check if /var/factory still has enough storage, and backup to some where, for example /var/factory/backup/$timestamp.txz.

And remove the backups if running out of disk space.

Temporarily assigned to yhong.
 

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

Cc: youcheng@chromium.org
Summary: factory: safer, faster, and better factory_restart (was: factory: safer factory_restart)
We'd like to add few more features.

1. Refactor factory_restart to make it functionalized.

2. Don't start UI (chrome) unless explicitly needed.

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

youcheng/yhong, I have few draft changes in https://chromium-review.googlesource.com/475852 and https://chromium-review.googlesource.com/475853/ . Do you want to take over and make it complete?
Owner: youcheng@chromium.org
ok, let me finish it

Comment 4 by hungte@chromium.org, Apr 13 2017

functionalized is done I believe.
[don't start UI] "works" but the user experience is probably not very good.

And I still think we need the /var/factory/backup feature, so people won't make mistakes by adding '-a'.
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 18 2017

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

commit 6adedfd7f16932baa137af26bee3c58ea9ae27e7
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 18 12:34:27 2017

tools: Improve chrome_debugger to better support Chrome loaded pages.

Since frecon is enabled for all Chromebooks, we will eliminate
interactive console based code soon, and redirect all messages to Chrome.

This implies we need a better tool to navigate Chrome browser.

The new chrome_openurl command will utilize chrome_debugger and redirect
all opening pages to given URL.

BUG= chromium:707164 
TEST=chrome_openurl about:blank
     chrome_openurl http://127.0.0.1:4012/

Change-Id: Ia24d9b03155b1603e99edff097da1eb4e94915e4
Reviewed-on: https://chromium-review.googlesource.com/476510
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/6adedfd7f16932baa137af26bee3c58ea9ae27e7/py/tools/chrome_debugger.py
[add] https://crrev.com/6adedfd7f16932baa137af26bee3c58ea9ae27e7/bin/chrome_openurl
[add] https://crrev.com/6adedfd7f16932baa137af26bee3c58ea9ae27e7/sh/chrome_openurl.sh

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 18 2017

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

commit fb52b4fb68f114084df426e84c7c155821f15d41
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 18 14:13:10 2017

sh: Refactor and functionalize factory_restart script.

Change factory_restart to better coding style with functions, adding
right quotes, and deleted unused function `clear_files`.

BUG= chromium:707164 
TEST=factory_restart;
     factory_restart -a

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

[modify] https://crrev.com/fb52b4fb68f114084df426e84c7c155821f15d41/sh/factory_restart.sh

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 23 2017

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

commit 9ebbb1100f302e0ee4ccf8408d26c472833dbbd8
Author: You-Cheng Syu <youcheng@chromium.org>
Date: Fri Jun 23 14:58:00 2017

sh: By default do not restart Chrome in factory_restart.

For most projects, Chrome browser is stable enough that we may reuse
existing Chrome session when restarting factory program (Goofy). This
will speed up restart execution time.

A new "-c" argument is added if the Chrome is really broken.

BUG= chromium:707164 
TEST=manually

Change-Id: I15e4f1818e80a45203f6f6ee4b3a7d356baa417f
Reviewed-on: https://chromium-review.googlesource.com/475853
Commit-Ready: Youcheng Syu <youcheng@chromium.org>
Tested-by: Youcheng Syu <youcheng@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[add] https://crrev.com/9ebbb1100f302e0ee4ccf8408d26c472833dbbd8/py/goofy/static/restarting.html
[modify] https://crrev.com/9ebbb1100f302e0ee4ccf8408d26c472833dbbd8/sh/factory_restart.sh
[modify] https://crrev.com/9ebbb1100f302e0ee4ccf8408d26c472833dbbd8/sh/goofy_control.sh

Comment 8 by hungte@chromium.org, Jul 14 2017

Status: Fixed (was: Untriaged)

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

Status: Archived (was: Fixed)

Sign in to add a comment