Legacy (V3) replication service

The legacy replication service is used to replicate EVA ICS v3 nodes with v4 until migrated.

Note

The service will be not supported and excluded from the default EVA ICS v4 distribution after v3 EOL.

Limitations

Protocol and configuration

  • only PSRT Pub/Sub servers are supported

  • only v3-to-v4 one-way replication is supported (v4-v3 actions are supported)

  • a single PSRT server per service is supported

  • auto-discovery is not supported

  • deployment is not supported

  • the service supports compressed API calls only (v3.4.2+ required)

  • individual real-time state replication is not supported. Remote nodes MUST have bulk topics configured

  • all v3 node controllers are considered as a single node. if any component is stopped, the whole node is marked as offline

Items

Cycle states are not supported (there are no replicated cycles in v4)

rpvt

v4-v3 rpvt calls are not supported: if a node can not be migrated to v4 yet, consider installing an additional local v4 node for rpvt functionality only.

Installing/updating

Legacy (V3) replication service is not included into EVA ICS distribution. To install/update it, either edit “eva/config/python-venv” registry key, specify the desired version in “extra” section (e.g. eva4-repl-legacy>=0.0.1) and rebuild the Python virtual environment (/opt/eva4/sbin/venvmgr build). Or execute:

/opt/eva4/sbin/venvmgr add eva4-repl-legacy
# or
/opt/eva4/sbin/venvmgr add eva4-repl-legacy==N # where N = version number

The latest eva-shell version number can be obtained from https://pypi.org/project/eva4-repl-legacy/

Setup

Use the template EVA_DIR/share/svc-tpl/svc-tpl-replication-legacy.yml:

# Legacy (EVA ICS v3) replication service
#
# Requires https://pypi.org/project/eva4-repl-legacy/ Python module installed
command: venv/bin/eva4-svc-repl-legacy
bus:
  path: var/bus.ipc
config:
  key_svc: eva.aaa.localauth
  ## psrt configuration
  pubsub:
    proto: psrt
    path: localhost:2873
    user: null
    password: null
    timeout: 10
    buf_size: 65536
    tls: false
    tls_ca: null
    bulk_subscribe:
      # bulk topics, required
      - all
  ## node configuration
  #nodes:
    #node1_legacy:
      #key_id: default-v3
      #key_legacy_id: default
      #reload_interval: 30
      # optional lightweight pings, to determine the node status (if not used,
      # the status is determined by reload results only)
      #ping_interval: 10
      #timeout: 5
      #controllers: ['uc', 'lm']
user: nobody

Create the service using eva-shell:

eva svc create eva.repl.legacy1 /opt/eva4/share/svc-tpl/svc-tpl-replication-legacy.yml

or using the bus CLI client:

cd /opt/eva4
cat DEPLOY.yml | ./bin/yml2mp | \
    ./sbin/bus ./var/bus.ipc rpc call eva.core svc.deploy -

(see eva.core::svc.deploy for more info)

EAPI methods

See EAPI commons for the common information about the bus, types, errors and RPC calls.

node.list

Description

List V3 nodes and their states

Parameters

none

Returns

List (struct)

Return payload example:

[
    {
        "build": 2022042901,
        "controllers": [
            "uc",
            "lm"
        ],
        "id": "plant1",
        "key": "default-v3",
        "key_legacy": "default",
        "online": true,
        "reload_interval": 10,
        "timeout": 5,
        "version": "3.4.2"
    },
    {
        "build": null,
        "controllers": [
            "uc",
            "lm"
        ],
        "id": "plant2",
        "key": "default-v3",
        "key_legacy": "default",
        "online": false,
        "reload_interval": 10,
        "timeout": 5,
        "version": null
    }
]

node.reload

Description

Force reload a node

Parameters

required

Returns

nothing

Parameters

Name

Type

Description

Required

i

String

Node name

yes