juju_verify.verifiers.ovn_central module¶
ovn-central verification.
- class juju_verify.verifiers.ovn_central.ClusterStatus(raw_status: str)¶
Bases:
objectObject representation of OVN cluster status.
Attributes of this object represent status of a single (Southbound or Northbound) cluster as retrieved from ‘cluster-status’ action of ovn-central charm unit. Example of an input data for initialization of this class:
Cluster ID: 567e7225-369e-40d6-abf8-9b442bbcd18b Server ID: 16335def-c21e-404c-b123-8337b3013c07 Address: ssl:10.5.2.232:6644 Status: cluster member Role: follower Term: 34 Leader: dbdb Vote: dbdb Log: '[66, 66]' Entries not yet committed: 0 Entries not yet applied: 0 Servers: - - 7f23 - ssl:10.75.224.151:6644 - - 1bc5 - ssl:10.75.224.192:6644 - - 1ef7 - ssl:10.75.224.120:6644 unit_map: ovn-central/0: 7f23 ovn-central/1: 1bc5 ovn-central/2: 1ef7
- property is_leader: bool¶
Return true if Server that reported this status consider itself a leader.
- property short_id: str¶
Return first 4 characters of a Server ID.
This format is often used to refer to servers within cluster instead of full ID.
- class juju_verify.verifiers.ovn_central.OvnCentral(units: List[Unit], exclude_affected_units: Optional[List[Unit]] = None)¶
Bases:
BaseVerifierImplementation of verification checks for the ovn-central charm.
- NAME = 'ovn-central'¶
- property all_application_units: List[Unit]¶
Return list of all units from an application of currently verified unit(s).
- check_downscale() Result¶
Check that removing selected units won’t affect cluster’s fault tolerance.
- check_reboot() Result¶
Check that it’s safe to temporarily bring down selected units.
This check verifies that rebooting selected units won’t bring the cluster below its fault tolerance.
- check_single_application() Result¶
Verify that all units that are being verified belong to the same app.
- check_supported_charm_version() Result¶
Verify that targeted application has required actions.
This verifier requires action “cluster-status” to be present on the charm.
- check_uncommitted_logs() Result¶
Verify that there are no uncommitted log entries on cluster leaders.
- check_unknown_servers() Result¶
Verify that there are no servers in cluster without associated unit.
This situation can happen if, for example, a unit is removed from the application, but it’s unable to gracefully leave cluster.
- static cluster_tolerance(size: int) int¶
Return number of failed nodes that the cluster can tolerate.
This calculation is based on the raft protocol’s requirement to have “(N/2) + 1” active nodes to maintain quorum.
- Parameters:
size – Current size of a cluster.
- Returns:
Number of nodes that can fail without loosing cluster quorum
- property complete_cluster_status: Dict[str, UnitClusterStatus]¶
Collect and return status of a cluster from every ovn-central unit.
This method collects Southbound and Northbound cluster status reports from every unit that belongs to an application of currently verified unit(s).
- model: Model¶
- class juju_verify.verifiers.ovn_central.UnitClusterStatus(southbound: ClusterStatus, northbound: ClusterStatus)¶
Bases:
tupleConvenience class that groups Southbound and Northbound cluster status.
This is how a single ovn-central unit views status of these clusters.
- property northbound¶
Alias for field number 1
- property southbound¶
Alias for field number 0