Product layer installation process states (product_layer)

Description

Virtual entity for managing deployment and update of the product layer in a domain.

Not stored in the DB. Built on every request from the domain.settings.product_layer field value, set automatically based on product layer installation results.

Provides access to information about the results 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 may contain an installation attempt rejected by the service.

To initiate a new installation (or reinstallation), create an entity with the `prefix` and `mode` fields. After preliminary condition checks, the state sequence is: `async` → `queued` → `inprogress` → (`installed` | `failure` | `error`).

The entity represents a state change by the installation process. It has no classic identifier and is distinguished by state (`state`), type (`kind`), and sequence number (`order`) in increasing time since the state change.

Manual product layer installation is not excluded. In that case the result is not reflected in the `product_layer` collection.

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 multi-operation: 'update'; in a specific domain: 'install'

Requested operation. Possible variants:

  • install - install the product layer.

  • update - update the product layer (performed only if the system was previously installed. Versions are not compared: metadata of the installed package is cleared and metadata of the new package is created. If the class field structure in the previous and new versions does not change, or only the set of fields changes but not their types and properties, the data in the class collection is preserved.

  • delete - delete the product layer. Data in product layer collections remains in place. On reinstallation the data is reattached.

  • clear - delete the product layer. Data in product layer collections is cleared.

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

Name prefix of the product layer archive file available via /rest/v1/fs/targets/product.
Applied only when creating the entity (installation order) to discover a specific product layer archive file; it is not included in the collection output.
If several files in the archive directory (/rest/v1/fs/targets/product) match the prefix, the file with the lexicographically greatest name is selected.

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

Deployment mode passed to the product layer installer. Possible variants:

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

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

Field: file
Mode: out
Type: str

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

Field: site
Mode: out
Type: str

Name of the site where the product layer deployment operation is performed.

Field: dt
Mode: out
Type: str

Date-time when the state was set, in rfc3339 format.

Field: status
Mode: out
Type: str

Installation process state. Possible variants:

  • registered - the process started after successful preliminary condition checks.

  • queued - the job is placed in the sequential multi-domain processing queue.

  • inprogress - the job is in progress. Across all domains there can be only one such instance.

  • installed - the product layer is installed. Despite the possibility of manually deleting the product layer and its individual entities, the state is displayed until the next change is initiated through the product_layer collection. In this case the entity contains the md5 hash of the file (the md5 field).

  • error - installation failed with an error. In this case the entity contains the console logging trace of the product layer deployment script (the trace field).

  • failure - installation was interrupted by technical conditions before control was passed to the product layer deployment script. For example, the archive scheduled for installation 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 product layer version. Present only in installed state entities. Used by the deployment service to determine version identity.

Field: trace
Mode: out
Type: str

Console output trace of the product layer deployment script. Present only in error state entities.

Field: kind
Mode: out
Type: str

Entity kind. Possible variants:

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

  • previous - previous state within the current installation process, as well as the previous final state while the current installation is not complete.

  • attempt - the last attempted product layer installation, interrupted for a technical reason. For example, a version identical to the already installed one was selected for installation (the last known one).

Field: order
Mode: out
Type: int

Sequence number of the state in increasing time since the state change. 0 is always the latest state. State history is not accumulated; previous states are displayed only to track installation progress.