commit | e215072c7fcbad8ea3db4a2a219c6332ec0f6f79 | [log] [tgz] |
---|---|---|
author | Rayan Dasoriya <dasoriya@google.com> | Tue Feb 22 21:15:01 2022 +0000 |
committer | Rayan Dasoriya <dasoriya@google.com> | Thu Feb 24 00:19:57 2022 +0000 |
tree | 75f388af0374e5cad0648c10d5cd442eaf31693b | |
parent | 7051d5efae54edfd9b57f4bcb1b12c9593fd16db [diff] |
Fix get_status api in COS policy manager GetStatus was deprecated in Update Engine. This broke the get_status api in COS Policy Manager. Changing the implementation to use GetStatusAdvanced api instead. BUG=b/219970525 TEST=presubmit and manually tested on VM RELEASE_NOTES=Fix get_status api in COS Policy Manager Change-Id: Ia0d0db2f5552cf528fb0863da1011aa1365a5a34
Policy Manager is the client for the COS control plane. It is responsible for reporting current instance status and fetching device update config.
It is designed to be a system daemon that's started immediately after boot. It sends status update to an update manager, which will respond with the appropriate update config.
Using the update config, it will generate the appropriate update policy blobs to enforce the update strategy set by the user.
Part of Policy Manager's features is to allow users to control the OS update behavior of their COS instances.
COS has defined 2 update stategies that users can choose:
All Updates Instances will receive all OS updates.
Critical Updates Only Instances will only receive updates within their major release version. For example, if both 12.1.0 and 13.0.0 are available, an instance running 12.0.0 will only get updated to 12.1.0 if it has this strategy.
The update manager generates update config that is fetched by Policy Manager when it reports its status to the update manager. The config depends on the instance‘s status and the user’s update strategy.
The actual enforcement of the strategies are done by the update policy, which is a Chrome OS feature. An update policy is a protobuf blob that contains the parameters that will be used to fetch updates from Omaha. Policy Manager is responsible for generating the update policy blobs from update config.
FEATURES=test emerge-lakitu spiny
gen_mock.sh
./gen_proto.sh
.