Skip to content

Internal Data Model

Mehdi Bendriss edited this page Jul 9, 2024 · 21 revisions

Backwards compatibility, during minor version upgrades, can be broken due to changes in the relations data.

This document is intended only for charm developers.

We aim to document the internal data models currently used in order to carefully assess any breaking changes in future releases of the OpenSearch charm.

We distinguish between the different types of relations.

1. Peer relation:

a. Application data -- opensearch-peers:

  • Generic:

    • security_index_initialised: bool: whether the security index has been initialized through the opensearch securityadmin script.
    • admin_user_initialized: bool: indicates that the admin user has been created and set.
    • bootstrap_contributors_count: int:
    • nodes_config: List[Node]: full list of current nodes configured by the charm.
    • deployment_description: DeploymentDescription: description of the current deployment.
    • update-ts: int: current time in nanoseconds since epoch (used to trigger a peer-rel-changed event by the leader).
  • On large deployments -- opensearch-peers:

    • cluster_fleet_apps: PeerClusterFleetApps: Mapping of full application id and PeerClusterApp (full descriptor of a juju opensearch app)
  • Locking (rolled operations) -- node-lock-fallback:

    • unit-with-lock: str: full name of the unit holding the lock, when peer relation is used for locking.
    • leader-acquired-lock-after-juju-event-id: str: indicates the juju event id where unit-with-lock was set.

b. Unit data:

  • Generic -- opensearch-peers:

    • started: bool: whether this unit has fully started and the node is up.
    • tls_configured: bool: flag set when TLS is fully configured in a unit (the TLS secrets / certificates and keys have been set and stored on disk)
    • bootstrap_contributor: bool: whether a cluster_manager eligible node has been part of the bootstrapping process (initial_cluster_managerin opensearch.yml)
    • certs_exp_checked_at: str: expiration date of the certificates (date_format %Y-%m-%d %H:%M:%S)
    • update-ts: int: current time in nanoseconds since epoch (used to trigger a peer-rel-changed event by any unit).
  • Locking (rolled operations) -- node-lock-fallback:

    • lock-requested: bool: whether this unit requested the lock.
    • -trigger: str: set the current juju context id to trigger a rel changed event on the leader (from a non leader unit).
Clone this wiki locally