Skip to content

Optimized, deterministic intermediate desired state feedback messages from update agent #201

@stoyan-zoubev

Description

@stoyan-zoubev

The current implementation of container update agent sends desired state feedback messages in a way that is dependent in the order of the containers to be updated.

Example: DOWNLOAD commmand for a desired state with one new container to be installed.
A. Container is not the last one in the list:

  1. CUA sends a feedback message with overall status DOWNLOADING, container action status DOWNLOADING when starting the creation process of the new container (container image is being downloaded).
  2. New container instance is created, then CUA sends a feedback message with overall status still DOWNLOADING, container action status DOWNLOAD_SUCCESS.
  3. The rest of the containers in the list of action do not need new container instances to be created. CUA almost immediately sends a feedback message with overall status DOWNLOAD_SUCCESS, container action status DOWNLOAD_SUCCESS to mark the completion of the DOWNLOAD command.

B. Container is the last one in the list.
In this case the second feedback message is skipped, CUA sends only messages 1 and 3 which is optimal.

The same is valid for the other commands too - UPDATE, ACTIVATE...

It is better to optimize the feedback messages. This will make testing easier and expected messages not dependent on the containers order.
Also unit tests shall be provided to cover the implementation. Such unit tests are currently missing completely.

Metadata

Metadata

Assignees

Labels

taskSingle unit of work

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions