New issue
Advanced search Search tips

Issue 817908 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Add an autotest that checks we don't update via P2P if we have failed too many times

Project Member Reported by dhadd...@chromium.org, Mar 1 2018

Issue description

The P2p Update will be disabled if either of the following are true:

1. the update has tried >10 times
2. The update first tried >5 days ago 

These can be controlled easily with an update_engine preference.

The test should be pretty light weight.

The real saving here is that we won't have to do the setup for the test manually anymore:

1. Get two devices on same network
2. Put on same image
3. Enable p2p on both
4. update one 
5. update another and check the update_engine logs for P2p entries 


 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 2 2018

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

commit 33727d62092e50897685ed9a7b8116ebc4a40648
Author: David Haddock <dhaddock@chromium.org>
Date: Fri Mar 02 03:13:32 2018

Add tests for when P2P AU should be disabled.

This should happen when we have tried to update using a payload >10 times
and/or if we last tried longer than 5 days ago.

Also adding copyright notices to all P2P control files.

BUG= chromium:817908 
TEST=autoupdate_P2P.delta
TEST=autoupdate_P2P.too_many_attempts.delta
TEST=autoupdate_P2P.deadline_expired.delta

Change-Id: I27903c866b47be28fce7db2ff4fe3a93933af845
Reviewed-on: https://chromium-review.googlesource.com/940640
Commit-Ready: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/33727d62092e50897685ed9a7b8116ebc4a40648/server/site_tests/autoupdate_P2P/autoupdate_P2P.py
[add] https://crrev.com/33727d62092e50897685ed9a7b8116ebc4a40648/server/site_tests/autoupdate_P2P/control.deadline_expired.delta
[add] https://crrev.com/33727d62092e50897685ed9a7b8116ebc4a40648/server/site_tests/autoupdate_P2P/control.too_many_attempts.delta
[modify] https://crrev.com/33727d62092e50897685ed9a7b8116ebc4a40648/server/site_tests/autoupdate_P2P/control.delta
[modify] https://crrev.com/33727d62092e50897685ed9a7b8116ebc4a40648/server/site_tests/autoupdate_P2P/control.local

Had a look into these failures, looks like the signature changes after I edited the prefs and update engine resets all of the prefs. 

Not sure why it is only happening sometimes though. 

Will look at it more tomorrow 
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 18 2018

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

commit 08f75e5481987cf91c311ab2de73cd39382557ca
Author: David Haddock <dhaddock@chromium.org>
Date: Wed Apr 18 11:29:59 2018

Fix for P2P AU Test failures.

The problem was that depending on when the test was ran, it would pass
or fail. If it followed a test that did a delta update it passed since
the payload signature would be correct and setting max_p2p_attempts > 10
would result in update_engine preventing any further attempts. However,
if the payload signature didn't match it would reset all state
(including p2p attempts) and the update would succeed.

This CL copies the payload signature from host 1 -> 2 so that we can
just edit the pref files to get into the state we need.

BUG= chromium:817908 
TEST=auotoupdate_P2P.delta, autoupdate_P2P.deadline_expired,
autoupdate_P2P.too_many_attempts

Change-Id: I162ed699b7e82efbade3663aea30dc1e3c26fd0f
Reviewed-on: https://chromium-review.googlesource.com/1013334
Commit-Ready: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/08f75e5481987cf91c311ab2de73cd39382557ca/server/site_tests/autoupdate_P2P/autoupdate_P2P.py
[modify] https://crrev.com/08f75e5481987cf91c311ab2de73cd39382557ca/server/cros/update_engine/update_engine_test.py

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 26 2018

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

commit 2fd9aec66ebf1411565262dea77f7599db17fe4f
Author: David Haddock <dhaddock@chromium.org>
Date: Thu Apr 26 06:00:32 2018

More refactoring and fixes for some failing tests.

Refactoring includes:
- Added Functions for getting multiple logs.
- Remove setting self._host in every test
- Remove printing update URL in every test.

Fixes:
EOL: Daisy is failing because we are calling update too soon after
restarting update engine. So I will just not restart it before the test.

P2P: I am resetting the current url index before I reboot.

Disconnect internet: Occasionally it fails because the progress moves
from 0.200001 to 0.200002. So I am just waiting for a bit for it to
settle.

Cellular tests: Have been failing after I incorrectly changed a variable
name from cellular to public.

BUG= chromium:833518 
BUG= chromium:817913 
BUG= chromium:817908 
TEST=all au tests.

Change-Id: I208b54e6c7c4076f4a6ecadb94e4c1bac69a3be7
Reviewed-on: https://chromium-review.googlesource.com/1025398
Commit-Ready: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/client/cros/update_engine/update_engine_util.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/client/site_tests/autoupdate_EOL/autoupdate_EOL.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/server/site_tests/autoupdate_NonBlockingOOBEUpdate/autoupdate_NonBlockingOOBEUpdate.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/server/site_tests/autoupdate_OmahaResponse/autoupdate_OmahaResponse.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/server/site_tests/autoupdate_P2P/autoupdate_P2P.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/client/site_tests/autoupdate_Backoff/autoupdate_Backoff.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/client/site_tests/autoupdate_DisconnectReconnectNetwork/autoupdate_DisconnectReconnectNetwork.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/client/site_tests/autoupdate_StartOOBEUpdate/autoupdate_StartOOBEUpdate.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/client/cros/update_engine/nano_omaha_devserver.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/server/site_tests/autoupdate_Cellular/autoupdate_Cellular.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/client/cros/update_engine/update_engine_test.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/server/cros/update_engine/update_engine_test.py
[modify] https://crrev.com/2fd9aec66ebf1411565262dea77f7599db17fe4f/server/site_tests/autoupdate_ForcedOOBEUpdate/autoupdate_ForcedOOBEUpdate.py

Sign in to add a comment