update engine: support download/install/update a DLC |
||||
Issue descriptionHere is a high-level proposal on tasks necessary to support DLC in UE. This means to gather initial feedback and a detailed document will be written later. Based on my understanding, at least following works have to be done to support a basic DLC install: 1. A new API AttemptInstallDlc which takes params like omaha_url, app_id, source path, dst path, etc. 2. Pipe through the params into DeltaPerformer to override source_path_ and target_path_. 3. generate payload successfully. Some detailed design aspects I can think of: 1. Since we are passing many parameters to the new API, we might want to pass these as a protobuf message based on https://chromium.googlesource.com/chromiumos/docs/+/master/dbus_best_practices.md#Consider-using-protocol-buffers-for-complex-messages. 2. In this design, UE has no prior knowledge about src and dest path for payload which are parameterized. But UE has to be able sanity check these parameters. Please feel free to point out any concerns or correct my naive understanding of the project.
,
Aug 30
Currently BootControlChromeOS is pretty passive (either A or B based on current active partition): it calls rootdev utility to as the truth to decide what to target (A or B). Deciding path for DLC is more involved: 1. path depends on DLC id, e.g. /home/chronos/dlc/[dlc id]/Dlc-A/dlc.img. 2. unlike platform update, update_engine has no idea whether to target A or B path for DLC and has to target based on the incoming D-Bus parameters. An alternative is pipe through DLC ID and A/B so update_engine can construct path internally but in that case DLC path is hard coded in UE and location migration in future may be challenging.
,
Sep 28
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/8d89f69f92a249558acd01d6ee94193670d8f408 commit 8d89f69f92a249558acd01d6ee94193670d8f408 Author: Xiaochu Liu <xiaochu@chromium.org> Date: Fri Sep 28 02:44:31 2018 update_engine: depend on system_api We add system_api in DEPEND for using the new update_engine protobuf. BUG= chromium:879313 TEST=emerge update_engine Change-Id: I7a16d62f50d23bde2879d4caf77ac97a1de14ade Reviewed-on: https://chromium-review.googlesource.com/1244747 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/8d89f69f92a249558acd01d6ee94193670d8f408/chromeos-base/update_engine/update_engine-9999.ebuild
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/4d12aedf0728868254563643b3ff3d4a3aaa62fd commit 4d12aedf0728868254563643b3ff3d4a3aaa62fd Author: Xiaochu Liu <xiaochu@chromium.org> Date: Tue Oct 02 12:20:02 2018 system_api: add update_engine proto for d-bus method parameter AttemptInstall D-Bus API uses protobuf for parameters. We add the protobuf here so other system services can construct parameters and call this API. BUG= chromium:879313 TEST=emerge-$BOARD system_api Change-Id: I72015cd96dc06c721ba3b840badcdf13f35e9c35 Reviewed-on: https://chromium-review.googlesource.com/1249803 Commit-Ready: Xiaochu Liu <xiaochu@chromium.org> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Xiaochu Liu <xiaochu@chromium.org> [modify] https://crrev.com/4d12aedf0728868254563643b3ff3d4a3aaa62fd/system_api/system_api.gyp [modify] https://crrev.com/4d12aedf0728868254563643b3ff3d4a3aaa62fd/system_api/system_api.pc [add] https://crrev.com/4d12aedf0728868254563643b3ff3d4a3aaa62fd/system_api/dbus/update_engine/update_engine.proto
,
Oct 4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/169cb74055e8c3372f8809d455d480963af30623 commit 169cb74055e8c3372f8809d455d480963af30623 Author: Hidehiko Abe <hidehiko@chromium.org> Date: Thu Oct 04 16:54:28 2018 Roll src/third_party/cros_system_api/ 7d4f284ec..2e1f8c671 (1 commit) https://chromium.googlesource.com/chromiumos/platform2/system_api.git/+log/7d4f284ecdc0..2e1f8c671bd4 $ git log 7d4f284ec..2e1f8c671 --date=short --no-merges --format='%ad %ae %s' 2018-09-27 xiaochu system_api: add update_engine proto for d-bus method parameter Created with: roll-dep src/third_party/cros_system_api Bug: 874735 , 879313 Test: Try. Change-Id: Ieab49202022b6f823989b32eaa7b8c5519c8c5d7 Reviewed-on: https://chromium-review.googlesource.com/c/1261535 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/master@{#596709} [modify] https://crrev.com/169cb74055e8c3372f8809d455d480963af30623/DEPS
,
Oct 12
The following revision refers to this bug: https://chromium.googlesource.com/aosp/platform/system/update_engine/+/88d90387e5964b05f9e30adb2648433e4a277ab9 commit 88d90387e5964b05f9e30adb2648433e4a277ab9 Author: Xiaochu Liu <xiaochu@chromium.org> Date: Fri Oct 12 22:16:34 2018 update_engine: support downloading DLC DLC (Downloadable Content) is a new concept that best can be described as pieces of programs that are considered extensions of the rootfs. Each DLC resides in the stateful partition and there are two slots for each DLC (A and B, same as root and kernel partitions.) Each slot is treated much like the root and kernel partitions themselves. This patch adds initial support for installing and updating one or multiple DLCs. Each DLC has a unique APP ID which is constructed such as ${PLATFORM_APPID}_${DLC_ID} where: PLATFORM_APPID: Is the APP ID currently used for system updates (release or canary) DLC_ID: Is a unique ID given to a DLC for its lifetime. The combination of these two unique IDs will generate a unique APP ID that can be used for fetching update payloads for DLCs for each board. Update engine traditionally is used for updating a system to a newer one using the A/B slots. However, with DLCs residing in the stateful partition, there is a chance that the stateful partition gets wiped or a new DLC is required to be installed in the current slot. To solve this problem, there is a new "Install" operation that allows downloading an update payload for the current slot with the same version as we are now. This CL adds AttemptInstall Dbus signal to be used for attempting an DLC install operation. Furthermore, two new flags are added to the update_engine_client utility: --dlc_ids: A colon separated list of DLC IDs. --install: Requests an install operation rather than an update. BUG= chromium:879313 TEST=unittest, manual test CQ-DEPEND=1266235 Change-Id: Ia9c9b702dc9d1bd47fbb10b30969baa0322993f6 Reviewed-on: https://chromium-review.googlesource.com/1195593 Commit-Ready: Xiaochu Liu <xiaochu@chromium.org> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Xiaochu Liu <xiaochu@chromium.org> [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/dbus_service.h [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/boot_control_chromeos.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/omaha_request_action_unittest.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/common_service.h [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/update_attempter.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/omaha_request_params.h [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/omaha_response_handler_action_unittest.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/common_service.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/common_service_unittest.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/dbus_service.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/client_library/include/update_engine/client.h [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/update_attempter_unittest.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/mock_update_attempter.h [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/client_library/client_dbus.h [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/client_library/client_dbus.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/omaha_response_handler_action.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/omaha_request_action.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/update_engine_client.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/omaha_request_params.cc [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/update_engine.gyp [modify] https://crrev.com/88d90387e5964b05f9e30adb2648433e4a277ab9/update_attempter.h
,
Oct 23
The following revision refers to this bug: https://chromium.googlesource.com/aosp/platform/system/update_engine/+/6310be621665186b2cca00343f1fb0c3a4ad73f6 commit 6310be621665186b2cca00343f1fb0c3a4ad73f6 Author: Xiaochu Liu <xiaochu@chromium.org> Date: Tue Oct 23 20:01:46 2018 update_engine: do not send platform updatecheck for install Currently we send updatecheck for platform for install. Based on what our conclusion earlier, we should not send updatecheck for platform in case of an install. In such case where updatecheck is not sent in request, updatecheck tag is also missing in response. We address this change accordingly in the response parser. Unit test is also updated accordingly. BUG= chromium:879313 TEST=unittest Change-Id: I1d7b0ac13062b268bbde9f45e713a039eeeb924e Reviewed-on: https://chromium-review.googlesource.com/1277717 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/6310be621665186b2cca00343f1fb0c3a4ad73f6/omaha_request_action.cc [modify] https://crrev.com/6310be621665186b2cca00343f1fb0c3a4ad73f6/omaha_request_action_unittest.cc
,
Oct 31
,
Nov 14
,
Nov 26
|
||||
►
Sign in to add a comment |
||||
Comment 1 by senj@chromium.org
, Aug 30