history
Experimental. For evaluation. Interfaces, configuration, and behavior may change incompatibly.
Records and queries node events and breakfix timelines supplied by workflows and integrations.
Prerequisites
- None.
Setup
- Add to tenant TOML:
This module must be enabled in your Remediation Orchestrator config before it is available to scripts.
This module is used to record node history.
Members
- ASSIGNED_TO_ENGINEER
- ASSIGNED_TO_OPERATOR
- ASSIGNED_TO_PROVIDER
- AUTOMATED_REMEDIATION
- CHILD_WORKFLOW_COMPLETED
- CHILD_WORKFLOW_SCHEDULED
- CHILD_WORKFLOW_STARTED
- DIAGNOSED
- ENTERED_BREAKFIX
- EXITED_BREAKFIX
- GPURTM_FAILURE_PREDICTED
- QUARANTINE
- REPAIR
- ROUTED_TO_POOR_PERFORMERS
- SCREENTEST
- SEEN
- SLOW_NODES_RELEASED
- SLOW_NODES_REVIEW_PENDING
- SLOW_NODES_TESTING
- SLOW_NODES_TEST_DISCARDED
- SLOW_NODES_TEST_FAILED
- UNSEEN
- VALIDATION
- check_integrity
- close_breakfix
- close_ticket
- current_breakfix_events
- delete
- delete_breakfix
- fix_exited_breakfix_open_tickets
- is_broken
- last_event
- record_v2
- set_breakfix_id
- set_cluster_id
- set_occurred_at
- set_tag_values
ASSIGNED_TO_ENGINEER
history.ASSIGNED_TO_ENGINEERstringAssigned to engineer state
ASSIGNED_TO_OPERATOR
history.ASSIGNED_TO_OPERATORstringAssigned to operator state
ASSIGNED_TO_PROVIDER
history.ASSIGNED_TO_PROVIDERstringAssigned to provider state
AUTOMATED_REMEDIATION
history.AUTOMATED_REMEDIATIONstringAutomated remediation state
CHILD_WORKFLOW_COMPLETED
history.CHILD_WORKFLOW_COMPLETEDstringChild workflow finished executing
CHILD_WORKFLOW_SCHEDULED
history.CHILD_WORKFLOW_SCHEDULEDstringParent scheduled a child workflow
CHILD_WORKFLOW_STARTED
history.CHILD_WORKFLOW_STARTEDstringChild workflow began executing
DIAGNOSED
history.DIAGNOSEDstringDiagnosed as bad state
ENTERED_BREAKFIX
history.ENTERED_BREAKFIXstringEntered breakfix state
EXITED_BREAKFIX
history.EXITED_BREAKFIXstringExited breakfix state
GPURTM_FAILURE_PREDICTED
history.GPURTM_FAILURE_PREDICTEDstringGPURTM predicted a failure and drained the node
QUARANTINE
history.QUARANTINEstringNode is held in breakfix pending bulk action
REPAIR
history.REPAIRstringRepair state
ROUTED_TO_POOR_PERFORMERS
history.ROUTED_TO_POOR_PERFORMERSstringWorkload canary measured the node as slow and reserved it for investigation
SCREENTEST
history.SCREENTESTstringScreen test recorded a result for the node
SEEN
history.SEENstringNode seen by Slurm sonar
SLOW_NODES_RELEASED
history.SLOW_NODES_RELEASEDstringSlow-node pipeline handed the node back out of the screen-test reservation
SLOW_NODES_REVIEW_PENDING
history.SLOW_NODES_REVIEW_PENDINGstringSlow-node pipeline parked the node for manual review after it passed
SLOW_NODES_TESTING
history.SLOW_NODES_TESTINGstringSlow-node pipeline moved the node into the screen-test reservation
SLOW_NODES_TEST_DISCARDED
history.SLOW_NODES_TEST_DISCARDEDstringSlow-node pipeline discarded a screen test failure because the test never ran
SLOW_NODES_TEST_FAILED
history.SLOW_NODES_TEST_FAILEDstringSlow-node pipeline drained the node for a failed screen test
UNSEEN
history.UNSEENstringNode not seen by Slurm sonar
VALIDATION
history.VALIDATIONstringValidation state
check_integrity
history.check_integrity(cluster_id?, start_time?, end_time?)Checks the integrity of the history records.
cluster_id?optionalstringThe cluster ID to check the integrity of.start_time?optionalstringOptional: only check records from this time onwards (RFC3339 format)end_time?optionalstringOptional: only check records up to this time (RFC3339 format)close_breakfix
history.close_breakfix(breakfix_id, occurred_at)Records events to close all tickets associated with the breakfix, and an exit event.
breakfix_idintThe ID the breakfix to close.occurred_atstringThe time to set for occcurred at.close_ticket
history.close_ticket(id, occurred_at, reason?)Records a record history to close the tickets associated with the event history record.
idintThe ID of the history record opening the ticket.occurred_atstringThe time to set for occcurred at.reason?optionalstringThe reason to close the ticket.current_breakfix_events
history.current_breakfix_events(hostname)Returns every event in the hostname’s current open breakfix record, ordered by occurred_at then id, both ascending.
hostnamestringThe hostname in the current tenant.eventslist[history.NodeHistory]A list of NodeHistory values, or an empty list if no record is open.delete
history.delete(id)Deletes a history record identified by its ID.
idintThe ID the history record.delete_breakfix
history.delete_breakfix(breakfix_id)Deletes all history records of a breakfix identified by its ID.
breakfix_idintThe ID the breakfix.fix_exited_breakfix_open_tickets
history.fix_exited_breakfix_open_tickets(cluster_id, start_time?, end_time?)Fixes integrity issues of type ‘exited_breakfix_with_open_ticket’ by closing open tickets with proper cleanup reason.
cluster_idstringThe cluster ID to check and fix issues for.start_time?optionalstringOptional: only fix issues from this time onwards (RFC3339 format)end_time?optionalstringOptional: only fix issues up to this time (RFC3339 format)fixed_countintNumber of tickets that were fixed.is_broken
history.is_broken(cluster_id, hostname)Checks if a host is in the midst of an open breakfix.
cluster_idstringThe cluster ID to check.hostnamestringThe hostname to check.is_brokenboolWhether the node is broken based on its history.last_event
history.last_event(cluster_id, hostname, exclude_event_types?, include_event_types?, tags?)Gets the last event for a host from its history.
cluster_idstringCluster ID to check.hostnamestringThe hostname to check.exclude_event_types?optionallist[string]Optional list of event types to exclude from consideration.include_event_types?optionallist[string]Optional list of event types to include in consideration.tags?optionaldict[string:string]Optional dictionary of tag key/value filters. Matching is case-insensitive; use % as a wildcard. All entries must match.resulthistory.NodeHistoryThe last event for the node, or None if no history exists.record_v2
history.record_v2(cluster_id, hostname, state, occurred_at?, tags?)Records a node history event.
cluster_idstringThe cluster ID the node belongs to.hostnamestringThe hostname.statestringThe state of the node to record.occurred_at?optionalstringThe time to record the event at.tags?optionaldict[string:string]A dictionary of tags to record with the event.set_breakfix_id
history.set_breakfix_id(id, breakfix_id)Updates the breakfix ID of the history record identified by its ID.
idintThe ID the history record.breakfix_idintThe ID of the breakfix to set for the record.set_cluster_id
history.set_cluster_id(id, cluster_id)Updates the cluster ID of the history record identified by its ID.
idintThe ID the history record.cluster_idstringThe cluster ID to set for the record.set_occurred_at
history.set_occurred_at(id, occurred_at)Updates the occurred at timestamp of the history record identified by its ID.
idintThe ID the history record.occurred_atstringThe time to set for occcurred at.set_tag_values
history.set_tag_values(id, tags)Sets the values of the specified tags of a history record.
idintThe ID the history record.tagsdict[string:string]The tags to overwrite.