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

Issue 858621 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Roll out updates in stages

Project Member Reported by maybelle@chromium.org, Jun 28 2018

Issue description

We want to allow administrators to roll out updates to their fleet in stages. This will give them a chance to try out a new version of ChromeOS before applying it to their whole organization. 

For example, an organization can define an update schedule as:

Time   | % Fleet
Week 1 |     5%
Week 2 |    20%
Week 3 |   100%

Which we will interpret to mean that 5% of the fleet should be updated in the first week that an update is available, 20% of the fleet should be updated in the second week, and so on.
 
Hopping on here, this is possible already by pinning versions in managed device OUs, though depending on one's OU structure that can be quite a headache.

It would be nice if this feature included some ability to also have beta updates be in the same timeline.  For us, we do want to have 5-10% of our devices on the beta channel, but managing that in an OU structure where we have devices in tens/hundreds of OUs isn't great either.  We end up needing to create further sub-OUs and overriding the channel policy in them.

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/system/update_engine/+/d3a1e35bdfd412311998135dc8536a314c1078e5

commit d3a1e35bdfd412311998135dc8536a314c1078e5
Author: Adolfo Victoria <adokar@google.com>
Date: Wed Jul 18 08:40:08 2018

update_engine: add staging pref to payload_state

Add kPrefsWallClockStagingWaitPeriod as a new pref so that the staging
wait period persists accross reboots. Change the old
kPrefsWallClockWaitPeriod constant to
kPrefsWallClockScatteringWaitPeriod to differentiate more clearly
between the two.

BUG= chromium:858621 
TEST=cros_workon_make update_engine --test

Change-Id: Ifc6aeb44271321cdd2f0d4cfa583a7bbc32b9004
Reviewed-on: https://chromium-review.googlesource.com/1138741
Commit-Ready: Adolfo Higueros <adokar@google.com>
Tested-by: Adolfo Higueros <adokar@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: May Lippert <maybelle@chromium.org>

[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/payload_state.cc
[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/payload_state_interface.h
[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/mock_payload_state.h
[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/update_attempter_unittest.cc
[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/payload_state.h
[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/common/constants.cc
[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/common/constants.h
[modify] https://crrev.com/d3a1e35bdfd412311998135dc8536a314c1078e5/update_attempter.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/external/libbrillo/+/a722b427ac5223635eafde4551dbb2db749ce252

commit a722b427ac5223635eafde4551dbb2db749ce252
Author: May Lippert <maybelle@chromium.org>
Date: Fri Jul 20 12:31:18 2018

libbrillo: Add new policy (DeviceUpdateStagingSchedule) for staging updates.

Add a new device policy that will allow administrators to specify a schedule
for rolling out updates to an organizational unit.

BUG= chromium:858621 
TEST=Used YAPS as DM server, verified that the new policy is parsed correctly.
CQ-DEPEND=CL:1119162

Change-Id: I72852ddf86e6c7e432aea38a33c6fb3be4c7f315
Reviewed-on: https://chromium-review.googlesource.com/1123683
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: May Lippert <maybelle@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/a722b427ac5223635eafde4551dbb2db749ce252/policy/device_policy_impl.h
[modify] https://crrev.com/a722b427ac5223635eafde4551dbb2db749ce252/policy/mock_device_policy.h
[modify] https://crrev.com/a722b427ac5223635eafde4551dbb2db749ce252/policy/tests/device_policy_impl_unittest.cc
[modify] https://crrev.com/a722b427ac5223635eafde4551dbb2db749ce252/policy/device_policy.h
[modify] https://crrev.com/a722b427ac5223635eafde4551dbb2db749ce252/policy/device_policy_impl.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 31

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

commit f81466de10bbe7a59ae2542c73fdfae92bf059ee
Author: Adolfo Victoria <adokar@google.com>
Date: Tue Jul 31 19:05:04 2018

Modify update staging policy to support day granularity instead of week

Change the DeviceUpdateStagingPercentOfFleetPerWeek to
DeviceUpdateStagingSchedule. Change the proto field for this policy to
a string since a JSON needs to be used now that primitives aren't being
used.

BUG= chromium:858621 

Change-Id: Ia6ae8d107c9a9f2fd58042c3f9b2f6956abb8306
Reviewed-on: https://chromium-review.googlesource.com/1135830
Commit-Queue: Adolfo Higueros <adokar@google.com>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579512}
[modify] https://crrev.com/f81466de10bbe7a59ae2542c73fdfae92bf059ee/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
[modify] https://crrev.com/f81466de10bbe7a59ae2542c73fdfae92bf059ee/chrome/test/data/policy/policy_test_cases.json
[modify] https://crrev.com/f81466de10bbe7a59ae2542c73fdfae92bf059ee/components/policy/proto/chrome_device_policy.proto
[modify] https://crrev.com/f81466de10bbe7a59ae2542c73fdfae92bf059ee/components/policy/resources/policy_templates.json
[modify] https://crrev.com/f81466de10bbe7a59ae2542c73fdfae92bf059ee/tools/metrics/histograms/enums.xml

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/febe7e80591af7c56d686536aff2d572c17b625b

commit febe7e80591af7c56d686536aff2d572c17b625b
Author: Lutz Justen <ljusten@chromium.org>
Date: Fri Aug 03 13:29:12 2018

Uprev protofiles and VERSION to Chromium 70.0.3509

This picks up the following changes:

Changes for components/policy.git
(https://chromium.googlesource.com/chromium/src/components/policy)
44df5479 Adolfo Victoria     Modify update staging policy to support da..
2d6a106b Bailey Berro        Add NetworkFileSharesAllowed pref and policy
40ef1a19 Jialiu Lin          Fix typo in VideoCaptureAllowedUrls policy
259c40ad Lutz Justen         DeviceStatusCollector: Add channel
5965646c sebsg               [Autofill] Change policy name for disablin..
ed531ca0 Pavol Marko         Allow extension policy to specify sensitiv..
45e2c67d Stefan Teodorescu   Add RelaunchNotification to ChromeOS
b519e599 Denis Kuznetsov     Add CRD remote command.
b7155870 Thomas Tangl        [unified-consent] Add enterprise policy fo..
419acdd8 Chris Hamilton      Create an enterprise policy control for ta..

CQ-DEPEND=CL:1158227,CL:1142480

BUG= chromium:858621 
TEST=./build_packages --board=amd64-generic && \
     cros_run_unit_tests --board=amd64-generic --packages authpolicy

Change-Id: I161954b8a7118980583c373e99e89372ede246aa
Reviewed-on: https://chromium-review.googlesource.com/1158225
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Reviewed-by: Roman Sorokin <rsorokin@chromium.org>

[modify] https://crrev.com/febe7e80591af7c56d686536aff2d572c17b625b/chromeos-base/protofiles/files/VERSION
[rename] https://crrev.com/febe7e80591af7c56d686536aff2d572c17b625b/chromeos-base/protofiles/protofiles-0.0.23.ebuild

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/external/libbrillo/+/904c2c9cd8d5ff06783030fb27ee23dcff743035

commit 904c2c9cd8d5ff06783030fb27ee23dcff743035
Author: Adolfo Victoria <adokar@google.com>
Date: Fri Aug 03 13:29:11 2018

libbrillo: policy: Modify UpdateStaging policy due to change in design

Modify the DeviceUpdateStagingSchedule policy code to account for the
changes to use JSON strings. Add JSONToListValue to remove repeated
logic between new JSON based policies.

BUG= chromium:858621 
TEST=cros_workon_make libbrillo --test
CQ-DEPEND=CL:1158225

Change-Id: I01f73980c5309d77bfe04861255d6665cb7e2e11
Reviewed-on: https://chromium-review.googlesource.com/1142480
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Tested-by: Adolfo Higueros <adokar@google.com>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/904c2c9cd8d5ff06783030fb27ee23dcff743035/policy/device_policy_impl.h
[modify] https://crrev.com/904c2c9cd8d5ff06783030fb27ee23dcff743035/policy/mock_device_policy.h
[modify] https://crrev.com/904c2c9cd8d5ff06783030fb27ee23dcff743035/policy/tests/device_policy_impl_unittest.cc
[modify] https://crrev.com/904c2c9cd8d5ff06783030fb27ee23dcff743035/policy/device_policy.h
[modify] https://crrev.com/904c2c9cd8d5ff06783030fb27ee23dcff743035/policy/device_policy_impl.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/e0785c7b755806cd797e6b0b6b58679313812b0c

commit e0785c7b755806cd797e6b0b6b58679313812b0c
Author: Lutz Justen <ljusten@chromium.org>
Date: Fri Aug 03 13:29:13 2018

authpolicy: Update DevicePolicyEncoder with new policies

Companion change of uprev protofiles and VERSION to Chromium 70.0.3509.
Adds support for DeviceUpdateStagingSchedule.

CQ-DEPEND=CL:1158225

BUG= chromium:858621 
TEST=./build_packages --board=amd64-generic && \
      cros_run_unit_tests --board=amd64-generic --packages authpolicy

Change-Id: I0c43f20d795aff7b34336d17cd0d632208982ee9
Reviewed-on: https://chromium-review.googlesource.com/1158227
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Roman Sorokin <rsorokin@chromium.org>

[modify] https://crrev.com/e0785c7b755806cd797e6b0b6b58679313812b0c/authpolicy/policy/device_policy_encoder.cc
[modify] https://crrev.com/e0785c7b755806cd797e6b0b6b58679313812b0c/authpolicy/policy/device_policy_encoder_unittest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 7

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/system/update_engine/+/5a0a82c9aa2148a79b1909cec31a6649c2dfd99f

commit 5a0a82c9aa2148a79b1909cec31a6649c2dfd99f
Author: Adolfo Victoria <adokar@google.com>
Date: Tue Aug 07 08:50:33 2018

update_engine: add utilities for update staging policy

Add staging_utils files that contain logic to decide what
to changes should be done to the state. This includes:
* Turn off staging if there is a forced update or if OOBE hasn't been
completed
* Keep the current staging state if no changes to the policy are
detected.
* Use a new waiting time if there have been changes to the policy.
* If there is a persisted value that is still valid, use it.

These changes aren't added to the update engine yet. The return value
of CalculateStagingCase will be used in update_attempter in
a switch statement to update the state based on the value.

BUG= chromium:858621 
TEST=cros_workon_make update_engine --test
CQ-DEPEND=CL:1142480

Change-Id: Ib06365793618c3f2a357e3ace8c660fe51cdf950
Reviewed-on: https://chromium-review.googlesource.com/1138983
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Adolfo Higueros <adokar@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[add] https://crrev.com/5a0a82c9aa2148a79b1909cec31a6649c2dfd99f/update_manager/staging_utils_unittest.cc
[add] https://crrev.com/5a0a82c9aa2148a79b1909cec31a6649c2dfd99f/update_manager/staging_utils.cc
[modify] https://crrev.com/5a0a82c9aa2148a79b1909cec31a6649c2dfd99f/Android.mk
[add] https://crrev.com/5a0a82c9aa2148a79b1909cec31a6649c2dfd99f/update_manager/staging_utils.h
[modify] https://crrev.com/5a0a82c9aa2148a79b1909cec31a6649c2dfd99f/update_engine.gyp

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 7

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/system/update_engine/+/497044c5c35dd9c14282097fde5953dca27a67d3

commit 497044c5c35dd9c14282097fde5953dca27a67d3
Author: Adolfo Victoria <adokar@google.com>
Date: Tue Aug 07 08:50:34 2018

update_engine: Add staging to update_attempter and omaha_request

Modify update_attempter and omaha_request so that they take the user's
staging settings into account. This includes:
* Turning off scattering if staging is on.
* Preserving scattering values if staging is off.
* Setting staging related persisted values if staging is on.
* Deleting the corresponding persisted values if staging is off.
* Making omaha use the max wait time for staging as its max scatter
period if staging is on.
* Add the corresponding unittests for this.

BUG= chromium:858621 
TEST=cros_workon_make update_engine --test

Change-Id: I501f90d9e195b5ceef61d3eac67ab52051793ae9
Reviewed-on: https://chromium-review.googlesource.com/1141217
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Adolfo Higueros <adokar@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/497044c5c35dd9c14282097fde5953dca27a67d3/omaha_request_params.h
[modify] https://crrev.com/497044c5c35dd9c14282097fde5953dca27a67d3/update_attempter_unittest.cc
[modify] https://crrev.com/497044c5c35dd9c14282097fde5953dca27a67d3/omaha_request_action_unittest.cc
[modify] https://crrev.com/497044c5c35dd9c14282097fde5953dca27a67d3/omaha_request_action.cc
[modify] https://crrev.com/497044c5c35dd9c14282097fde5953dca27a67d3/omaha_request_action.h
[modify] https://crrev.com/497044c5c35dd9c14282097fde5953dca27a67d3/update_attempter.h
[modify] https://crrev.com/497044c5c35dd9c14282097fde5953dca27a67d3/update_attempter.cc

Labels: M-70
Labels: -Pri-3 Pri-2
Status: Fixed (was: Assigned)
Feature has landed. Allowing staging for the beta and dev channel is not in scope, if that is a desired feature, please file a separate feature bug to track it.

Sign in to add a comment