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

Issue 724085 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Network connection will be gone when doing factory_restart.

Project Member Reported by hungte@chromium.org, May 18 2017

Issue description

Reported by both stimim and yllin. When doing factory_restart, sometimes the network connection, via ssh or overlord, will be disconnected and need a reboot to resume.

Not sure what happened yet.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 27 2017

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

commit ebca4e265dbf87a20245eaadc42966186eece691
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Jun 27 15:59:29 2017

goofy: Prevent resetting network in Goofy init.

When starting Goofy, the test/utils/connection_manager was implemented as
"EnableNetwork(reset=False) unless `override_blacklisted_network_devices`
is set" on first launch, and do reset=True when Goofy is switching
from a test requesting exclusive network resource back to normal state.

However when being migrated to Goofy Plugins, the OnStart, which is
invoked for both system init and exclusive-resource transition, is
implemented as always do reset=True.

This creates a problem that even if override_blacklisted_network_devices
is None, we'll see a network reset (disable and enable) when Goofy
starts. This is also causing problems when we do remote SSH.

As a result, we should skip the first OnStart (since the plugin is always
doing start_enabled=True) and only do EnableNetwork(reset=True) in
normal running state.

BUG=chromium:737052, chromium:724085 
TEST=make test; manually tested on DUT.

Change-Id: Ib589c84ed793c866b675b107144dd8ec3336978d
Reviewed-on: https://chromium-review.googlesource.com/550495
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Commit-Queue: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/ebca4e265dbf87a20245eaadc42966186eece691/py/goofy/plugins/connection_manager.py

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 28 2017

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

commit 4c930774381f21ef2bc097bb2e4fcb123240500e
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Jun 28 10:09:47 2017

goofy: Change connection_manager to keep network on Goofy shutdown.

Connection manager plugin used to disable network when plugin is going
to be stopped; however this creates a problem that factory_restart and
wipe_in_place will run without network (since plugins are "stopped"
before "destroyed").

Adding a EnableNetworking in OnDestroyed does not help because enabling
and disabling takes too long and Goofy process may be killed before
finished re-configuring network.

As a result, we have to peak Goofy status (check if TERMINATING) in
plugin OnStop to decide if we should enable or disable network.

For long term we should improve connection manager to "restore system
network state when connection manager is initialized" instead of simply
"enabling network".

BUG= chromium:737051 , chromium:724085 
TEST=gooftool wipe_in_place; See network still enabled.

Change-Id: Id6b1d54c157f81512079e9d174cce1042e00c202
Reviewed-on: https://chromium-review.googlesource.com/549760
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/4c930774381f21ef2bc097bb2e4fcb123240500e/py/goofy/plugins/connection_manager.py

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 28 2017

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

commit bc731f6389c5423e0991eccb60628eeffa5d1a56
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Jun 28 10:09:47 2017

goofy: Prevent resetting network in Goofy init.

When starting Goofy, the test/utils/connection_manager was implemented as
"EnableNetwork(reset=False) unless `override_blacklisted_network_devices`
is set" on first launch, and do reset=True when Goofy is switching
from a test requesting exclusive network resource back to normal state.

However when being migrated to Goofy Plugins, the OnStart, which is
invoked for both system init and exclusive-resource transition, is
implemented as always do reset=True.

This creates a problem that even if override_blacklisted_network_devices
is None, we'll see a network reset (disable and enable) when Goofy
starts. This is also causing problems when we do remote SSH.

As a result, we should skip the first OnStart (since the plugin is always
doing start_enabled=True) and only do EnableNetwork(reset=True) in
normal running state.

BUG= chromium:737051 , chromium:724085 
TEST=make test; manually tested on DUT.

Change-Id: Ib589c84ed793c866b675b107144dd8ec3336978d
Reviewed-on: https://chromium-review.googlesource.com/550455
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/bc731f6389c5423e0991eccb60628eeffa5d1a56/py/goofy/plugins/connection_manager.py

Comment 4 by hungte@chromium.org, Jun 28 2017

Cc: yllin@chromium.org
Owner: hungte@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment