Loading proto/pathcompextended.proto +1 −0 Original line number Original line Diff line number Diff line Loading @@ -96,6 +96,7 @@ message TransportNetworkSliceL3 { // Generic // Generic message LivenessProbe{ message LivenessProbe{ bool alive = 1; bool alive = 1; string message = 2; } } message UUID { message UUID { Loading src/pathcompextended/service/PathCompExtendedServiceServicerImpl.py +3 −0 Original line number Original line Diff line number Diff line Loading @@ -63,9 +63,12 @@ class PathCompExtendedServiceServicerImpl(PathCompExtendedServiceServicer): try: try: hrat_healthy = self._hrat_client.health() hrat_healthy = self._hrat_client.health() reply.alive = hrat_healthy reply.alive = hrat_healthy reply.message = "H-RAT is alive and TFS can connect to it" LOGGER.debug('[HealthCheck] H-RAT health check: {:s}'.format(str(hrat_healthy))) LOGGER.debug('[HealthCheck] H-RAT health check: {:s}'.format(str(hrat_healthy))) except Exception as e: except Exception as e: LOGGER.warning('[HealthCheck] Error checking H-RAT health: {:s}'.format(str(e))) LOGGER.warning('[HealthCheck] Error checking H-RAT health: {:s}'.format(str(e))) reply.alive = False reply.message = "H-RAT is not alive or TFS cannot connect to it" # Don't fail overall health check if H-RAT is unavailable # Don't fail overall health check if H-RAT is unavailable LOGGER.debug('[HealthCheck] end ; reply = {:s}'.format(grpc_message_to_json_string(reply))) LOGGER.debug('[HealthCheck] end ; reply = {:s}'.format(grpc_message_to_json_string(reply))) Loading Loading
proto/pathcompextended.proto +1 −0 Original line number Original line Diff line number Diff line Loading @@ -96,6 +96,7 @@ message TransportNetworkSliceL3 { // Generic // Generic message LivenessProbe{ message LivenessProbe{ bool alive = 1; bool alive = 1; string message = 2; } } message UUID { message UUID { Loading
src/pathcompextended/service/PathCompExtendedServiceServicerImpl.py +3 −0 Original line number Original line Diff line number Diff line Loading @@ -63,9 +63,12 @@ class PathCompExtendedServiceServicerImpl(PathCompExtendedServiceServicer): try: try: hrat_healthy = self._hrat_client.health() hrat_healthy = self._hrat_client.health() reply.alive = hrat_healthy reply.alive = hrat_healthy reply.message = "H-RAT is alive and TFS can connect to it" LOGGER.debug('[HealthCheck] H-RAT health check: {:s}'.format(str(hrat_healthy))) LOGGER.debug('[HealthCheck] H-RAT health check: {:s}'.format(str(hrat_healthy))) except Exception as e: except Exception as e: LOGGER.warning('[HealthCheck] Error checking H-RAT health: {:s}'.format(str(e))) LOGGER.warning('[HealthCheck] Error checking H-RAT health: {:s}'.format(str(e))) reply.alive = False reply.message = "H-RAT is not alive or TFS cannot connect to it" # Don't fail overall health check if H-RAT is unavailable # Don't fail overall health check if H-RAT is unavailable LOGGER.debug('[HealthCheck] end ; reply = {:s}'.format(grpc_message_to_json_string(reply))) LOGGER.debug('[HealthCheck] end ; reply = {:s}'.format(grpc_message_to_json_string(reply))) Loading