Process states of the product layer installation process (product_layer)

Table of Contents

Description

A virtual entity to manage the rollout and update of the product layer in the domain.

Not stored in the database. It is built each time it is accessed based on the value of the domain.settings.product_layer field, set automatically based on the results of product layer installation.

Provides access to information about the outcome of the last product layer installation operation. If the state is not final, the collection also contains previous states. If the state is final, the collection probably contains an installation attempt rejected by the service.

To initiate a new installation (or reinstallation), you must create an entity with the fields `prefix` and `mode`. After pre-checking the conditions, the sequence of state changes will be as follows: `async` → `queued` → `inprogress` → (`installed` | `failure` | `error`).

An entity represents the fact of a state change by the installation process. Does not have a classical identifier, and are distinguished by state (`state`), type (`kind`), and ordinal number (`order`) by increasing time elapsed since the moment of state change.

Manual installation of the product layer is not excluded. In this case the result will not be reflected within the collection framework `product_layer`.

Fields

Entity structure
{
  "prefix": str,
  "mode": str,
  "file": str,
  "site": str,
  "status": str,
  "dt": str,
  "trace": str,
  "md5": str,
  "kind": str,
  "order": int
}
Table 1. Fields
Specification Description

Field: operation
Mode: in
Type: str
Default: In multitransaction: 'update', in a specific domain: 'install'

Ordered operation. Possible options:

  • install - product layer installation.

  • update - update of the product layer (it is performed only if the system has been installed before. No version comparison is performed - metadata of the installed package are cleared and metadata of the new package are created. If the structure of class fields is not changed in the previous and new versions, or only the composition of fields is changed, but not their types and properties, the data in the class collection is preserved.

  • delete - deleting a product layer. The data in the product layer collections remains in place. When reinstalling, the data is hooked up.

  • clear - deletion of the product layer. The data in the product layer collections is cleared.

Field: prefix
Mode: in
Type: str
Default: required

The prefix of the name of the product layer archive file accessible via the /rest/v1/fs/targets/product.
Applies only when creating an entity (installation order) to discover a specific product layer archive file, and is not contained in the collection issue.
If several files in the archive directory (/rest/v1/fs/targets/product) match the prefix, the file with the lexicographically largest name is selected.

Field: mode
Mode: in
Type: str
Default: required

The sweep mode passed to the product layer installer. Possible options:

  • default - all microservices are collapsed into a single operating system process.

  • multi - each microservice in a separate operating system process with a separate connection to the platform.

Field: file
Mode: out
Type: str

The name of the product layer archive file applied based on the specified prefix.

Field: site
Mode: out
Type: str

The name of the site where the product layer sweep operation is performed.

Field: dt
Mode: out
Type: str

Date-time of state setting in format rfc3339.

Field: status
Mode: out
Type: str

Installation process status. Possible options:

  • registered - the process started after a successful pre-condition check.

  • queued - the job is placed in the queue of sequential multidomain processing.

  • inprogress - task in progress. Only one such instance is possible for all domains.

  • installed - product layer is set. Although it is possible to manually delete the product layer and its individual entities, the state will be displayed until the next change initiation via the product_layer collection. In this case, the md5 hash from the file will be placed in the entity (field md5).

  • error - the installation failed. In this case, the trace of the console logging of the product layer sweep script will be placed in the entity (field trace).

  • failure - the installation was interrupted due to technical conditions before transferring control to the product layer unwrapping script. For example, an archive scheduled for deployment was not found after a long wait in the queue.

Field: md5
Mode: out
Type: str

MD5 hash of the archive file of the installed version of the product layer. Present only in installed state entities. Used by the deployment service to determine version identity.

Field: trace
Mode: out
Type: str

Trace console output by product layer sweep script. Present only in state entities error.

Field: kind
Mode: out
Type: str

Entity Type. Possible options:

  • current - current state. Only one entity of this type in the domain.

  • previous - the previous state within the current installation process, as well as the previous final state during the phase until the current installation is complete.`

  • attempt - the last attempt made to install the product layer, interrupted for technical reasons. For example, a version matching the already installed version (the last known version) is selected for installation.

Field: order
Mode: out
Type: int

Order number of the state in order of increasing time elapsed since the state change. 0 is always the last state. The history of states is not accumulated, previous states are displayed only for the needs of tracking the progress of the installation.