ska_pst.lmc.health_check
This subpackage for health check classes used by PST.LMC.
- class ska_pst.lmc.health_check.HealthCheckHandler(*args, **kwargs)[source]
A protocol classes can implement to be used as a health check state handler.
- handle_health_check_state(state: HealthCheckState, **kwargs: Any) None[source]
Handle a health check state of a remote service.
- Parameters
state (HealthCheckState) – the current health check state of the remote service.
- class ska_pst.lmc.health_check.HealthCheckState(*, service_name: str, service_uuid: str, actual_service_uuid: str | None = None, obs_state: ObsState | None = None, fault_message: str | None = None, exception: Exception | None = None)[source]
A data class used to pass around health check state of a service.
Since the LMC manages all the services this data class includes fields such as
service_nameandservice_uuidto allow identifying which instance of a service produced the state object.- actual_service_uuid: str | None = None
The UUID received from the remote service on the recent health check.
If the service has restarted an instance of this class may not have received a valid response and the
exceptionfield should be set.Under normal processing this value should be set and equal to the
service_uuidvalue.
- exception: Exception | None = None
The exception that has been received during health check processing.
A common reason for this is that the remote service has been restarted and as such the health check process will get an exception. By storing the error the health check processing in a component manager can determine how to handler the error.
- fault_message: str | None = None
The reason why the remote service is in
ObsState.FAULTstate.
- obs_state: ObsState | None = None
The current observation state of the remote service.
- service_name: str
The name of the service that the health check state is for.
- service_uuid: str
The UUID of the instance of the service.
This is the value obtained from calls to
connectof the service. A difference between this and theactual_service_uuidattribute may represent an issue, such as the service instance had restarted.