Skip to navigation

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:
[modules.history]

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

history.ASSIGNED_TO_ENGINEERstring

Assigned to engineer state

ASSIGNED_TO_OPERATOR

history.ASSIGNED_TO_OPERATORstring

Assigned to operator state

ASSIGNED_TO_PROVIDER

history.ASSIGNED_TO_PROVIDERstring

Assigned to provider state

AUTOMATED_REMEDIATION

history.AUTOMATED_REMEDIATIONstring

Automated remediation state

CHILD_WORKFLOW_COMPLETED

history.CHILD_WORKFLOW_COMPLETEDstring

Child workflow finished executing

CHILD_WORKFLOW_SCHEDULED

history.CHILD_WORKFLOW_SCHEDULEDstring

Parent scheduled a child workflow

CHILD_WORKFLOW_STARTED

history.CHILD_WORKFLOW_STARTEDstring

Child workflow began executing

DIAGNOSED

history.DIAGNOSEDstring

Diagnosed as bad state

ENTERED_BREAKFIX

history.ENTERED_BREAKFIXstring

Entered breakfix state

EXITED_BREAKFIX

history.EXITED_BREAKFIXstring

Exited breakfix state

GPURTM_FAILURE_PREDICTED

history.GPURTM_FAILURE_PREDICTEDstring

GPURTM predicted a failure and drained the node

QUARANTINE

history.QUARANTINEstring

Node is held in breakfix pending bulk action

REPAIR

history.REPAIRstring

Repair state

ROUTED_TO_POOR_PERFORMERS

history.ROUTED_TO_POOR_PERFORMERSstring

Workload canary measured the node as slow and reserved it for investigation

SCREENTEST

history.SCREENTESTstring

Screen test recorded a result for the node

SEEN

history.SEENstring

Node seen by Slurm sonar

SLOW_NODES_RELEASED

history.SLOW_NODES_RELEASEDstring

Slow-node pipeline handed the node back out of the screen-test reservation

SLOW_NODES_REVIEW_PENDING

history.SLOW_NODES_REVIEW_PENDINGstring

Slow-node pipeline parked the node for manual review after it passed

SLOW_NODES_TESTING

history.SLOW_NODES_TESTINGstring

Slow-node pipeline moved the node into the screen-test reservation

SLOW_NODES_TEST_DISCARDED

history.SLOW_NODES_TEST_DISCARDEDstring

Slow-node pipeline discarded a screen test failure because the test never ran

SLOW_NODES_TEST_FAILED

history.SLOW_NODES_TEST_FAILEDstring

Slow-node pipeline drained the node for a failed screen test

UNSEEN

history.UNSEENstring

Node not seen by Slurm sonar

VALIDATION

history.VALIDATIONstring

Validation state

check_integrity

history.check_integrity(cluster_id?, start_time?, end_time?)

Checks the integrity of the history records.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
hostnamestringThe hostname in the current tenant.
Returns
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.

Parameters
idintThe ID the history record.

delete_breakfix

history.delete_breakfix(breakfix_id)

Deletes all history records of a breakfix identified by its ID.

Parameters
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.

Parameters
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)
Returns
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.

Parameters
cluster_idstringThe cluster ID to check.
hostnamestringThe hostname to check.
Returns
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.

Parameters
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.
Returns
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
idintThe ID the history record.
tagsdict[string:string]The tags to overwrite.