Skip to navigation

Deprecated. Avoid new adoption. Read the module’s deprecation guidance.

Deprecated because it bundles infrastructure-specific diagnostics and recovery with their execution dependencies. Retained as an implementation reference for future replacement modules. No removal release is scheduled.

Prerequisites

  • Configured command module.
  • Operator-supplied diagnostic tools, assets and access for the selected procedures.

Setup

  • For existing installations, enable the module:
[modules.runbooks]

This module must be enabled in your Remediation Orchestrator config before it is available to scripts.

Host remediation and diagnostic suites using operator-installed tools. Functions accept a cluster_config describing the selected operation and return its diagnostic or remediation results.

Members

bmc_reset

runbooks.bmc_reset(cluster_config, node_id)

Reset BMC on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node whose BMC to reset.
Returns
resultrunbooks.OperationResultThe operation result.

cluster_config

runbooks.cluster_config(cluster_id, artifactory_user?, new_artifactory_user?, bmc_redfish_user?, bmc_network?, bmc_route?, hardware_model?, datacenter?, dcgm_eud_restrictions?, mellanox_visible_devices?, wfrun_artifact_name?, wfrun_artifact_version?, wfrun_output_path?, wfrun_image_download_timeout?, feature_flags?, provider_log_url?, log_output_base_path?, safe_host_slurm_reservations?, safe_host_slurm_states?, safe_host_slurm_partitions?, dca_host_slurm_reservations?, control_hostnames?, nvssvt_profile?, nvssvt_tests?, ist_tar?, fieldiag_src?, gpus_per_node?, bmc_recovery_wait?, bmc_operation_wait?, gpu_driver_unload_wait?, reboot_poll_interval?, reboot_poll_count?, eud_cleanup_wait?, health_image?, screen_test_image?, dcgm_image?, snst_nccl_loopback_image?, snst_nccl_image?, snst_nemotron_image?, snst_config_file?, dcgm_run_level?, wfrun_retry_max_attempts?, wfrun_retry_initial_delay?, wfrun_retry_backoff_factor?, scontrol_node_id?, sdl_test_duration_seconds?, hobbits_path?, snst_slurm_reservation?, healthcheck_script_path?, hobbits_slurm_account?)

Construct a cluster configuration.

Parameters
cluster_idstringThe cluster ID.
artifactory_user?optionalstringThe legacy Artifactory user.
new_artifactory_user?optionalstringThe current Artifactory user.
bmc_redfish_user?optionalstringThe BMC Redfish user.
bmc_network?optionalstringThe BMC network.
bmc_route?optionalstringThe BMC route.
hardware_model?optionalstringThe hardware model.
datacenter?optionalstringThe datacenter name.
dcgm_eud_restrictions?optionalstringDCGM EUD test restrictions for cloud/virtualized environments (e.g., ‘run_tests=compute,high_vf,memory,misc’).
mellanox_visible_devices?optionalstringThe Mellanox visible devices.
wfrun_artifact_name?optionalstringThe WFRUN artifact name.
wfrun_artifact_version?optionalstringThe WFRUN artifact version.
wfrun_output_path?optionalstringThe WFRUN output path.
wfrun_image_download_timeout?optionalstringThe WFRUN image download timeout.
feature_flags?optionallist[string]The feature flags.
provider_log_url?optionalstringThe provider log URL.
log_output_base_path?optionalstringThe log output base path.
safe_host_slurm_reservations?optionallist[string]The safe host Slurm reservations.
safe_host_slurm_states?optionallist[string]The safe host Slurm states.
safe_host_slurm_partitions?optionallist[string]The safe host Slurm partitions.
dca_host_slurm_reservations?optionallist[string]The DCA host Slurm reservations.
control_hostnames?optionallist[runbooks.NodeHostname]The control hostnames.
nvssvt_profile?optionalstringThe NVSSVT profile to use.
nvssvt_tests?optionallist[string]List of NVSSVT tests to run (e.g., [‘nccl’, ‘fma’]). If empty, runs all tests.
ist_tar?optionalstringThe IST tarball name.
fieldiag_src?optionalstringThe source path for field diagnostics.
gpus_per_node?optionalstringThe number of GPUs per node.
bmc_recovery_wait?optionalstringTime to wait after BMC reset for devices to come online (e.g., ‘10m’).
bmc_operation_wait?optionalstringTime to wait between BMC operations like power off/on (e.g., ‘5m’).
gpu_driver_unload_wait?optionalstringTime to wait between GPU driver unload attempts (e.g., ‘100ms’).
reboot_poll_interval?optionalstringTime to wait between reboot polling attempts (e.g., ‘1m’).
reboot_poll_count?optionalintNumber of polling attempts before timing out (default: 60).
eud_cleanup_wait?optionalstringTime to wait after EUD cleanup and GPU stabilization (default: ‘120s’).
health_image?optionalrunbooks.ImageConfigThe health image.
screen_test_image?optionalrunbooks.ImageConfigThe screen test image.
dcgm_image?optionalrunbooks.ImageConfigThe DCGM validation image.
snst_nccl_loopback_image?optionalrunbooks.ImageConfigThe SNST NCCL loopback test image (overrides screen_test_image).
snst_nccl_image?optionalrunbooks.ImageConfigThe SNST NCCL test image (overrides screen_test_image).
snst_nemotron_image?optionalrunbooks.ImageConfigThe SNST Nemotron test image (overrides screen_test_image).
snst_config_file?optionalstringThe SNST configuration file.
dcgm_run_level?optionalintThe DCGM validation run level (default: 4).
wfrun_retry_max_attempts?optionalintMaximum retry attempts for infra errors (default: 3).
wfrun_retry_initial_delay?optionalstringInitial delay between retries e.g. ‘15m’, ’30s’ (default: ‘15m’).
wfrun_retry_backoff_factor?optionalfloatBackoff multiplier for exponential delay (default: 2.0).
scontrol_node_id?optionalstringDatacenter node ID of the scontrol node for hobbits-based SNST tests (required when a hobbits SNST feature flag is in feature_flags).
sdl_test_duration_seconds?optionalintSDL test duration in seconds (default: 900).
hobbits_path?optionalstringPath to hobbits repo on scontrol node (required when a hobbits SNST feature flag is in feature_flags).
snst_slurm_reservation?optionalstringSlurm reservation for hobbits SNST tests (passed as —slurm-reservation).
healthcheck_script_path?optionalstringPath to healthcheck.py on the node; empty uses the configured module default.
hobbits_slurm_account?optionalstringSlurm account for hobbits SNST tests (passed as —slurm-account when set).
Returns
cluster_configrunbooks.ClusterConfigThe cluster configuration.

collect_node_diagnostics

runbooks.collect_node_diagnostics(cluster_config, node_hostname)

Collect diagnostic logs from a node, written to return nodes to OCI.

Parameters
cluster_configrunbooks.ClusterConfigDictionary of cluster configuration values including feature_flags.
node_hostnamestringThe hostname of the node to collect diagnostics from.
Returns
storage_prefixstringA prefix for the object store path to which the results were written

dcgm_validation

runbooks.dcgm_validation(cluster_config, node_id, run_level?)

Run DCGM validation on a node. Calls dcgmi diag directly without any wrapper test suites.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration. Replayed legacy workflows require dcgm_image.
node_idrunbooks.NodeIDThe ID of the node to validate.
run_level?optionalintDCGM diagnostic run level (1=quick, 2=medium, 3=extended, 4=full). Defaults to cluster config value or 4.
Returns
resultsrunbooks.ResultsReportThe DCGM validation results report.

enhanced_power_cycle

runbooks.enhanced_power_cycle(cluster_config, node_id, wait_for_login?)

Perform a complete power cycle with comprehensive status reporting. Returns detailed outcome for agent decision-making.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to power cycle.
wait_for_login?optionalboolWhether to wait for SSH login availability after boot.
Returns
resultrunbooks.EnhancedPowerCycleResultComprehensive result with outcome, failure_reason, and observable state.

ensure_boot

runbooks.ensure_boot(cluster_config, node_id)

Ensure a node boots successfully, retrying with ForceRestart if stuck.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to boot.
Returns
resultrunbooks.EnsureBootResultThe result containing boot status and attempt count.

get_post_code

runbooks.get_post_code(cluster_config, node_id)

Get the current BIOS POST code of a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to query.
Returns
resultrunbooks.GetPostCodeResultThe POST code result. Code ‘e3’ indicates OS is loading.

get_power_state

runbooks.get_power_state(cluster_config, node_id)

Get the current chassis power state of a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to query.
Returns
resultrunbooks.GetPowerStateResultThe power state result containing the current state (On/Off).

gpu_reset

runbooks.gpu_reset(cluster_config, node_id, fail_on_error?, additional_services?)

Reset GPUs on a node after safely quiescing GPU services. Example: result = runbooks.gpu_reset(config, node_id, fail_on_error=False, additional_services=[‘provider-collector’]).

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node whose GPUs to reset.
fail_on_error?optionalboolWhether to treat underlying errors as fatal (default true). When false, returns success=false with message and category.
additional_services?optionallist[string]Provider-specific services to quiesce in addition to the default GPU services.
Returns
resultrunbooks.OperationResultThe result of the GPU reset operation.

graceful_shutdown

runbooks.graceful_shutdown(cluster_config, node_id)

Attempt a graceful OS-level shutdown on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to shut down.
Returns
resultrunbooks.GracefulShutdownResultThe result indicating if shutdown was initiated.

health_check

runbooks.health_check(cluster_config, node_id, direct_ssh?)

Run health check on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to health check.
direct_ssh?optionalboolDeprecated: Whether to use the direct ssh connection to run the health check. Healthcheck always runs via SSH.
Returns
resultsrunbooks.ResultsReportThe health check results report.

image_config

runbooks.image_config(host, org, team, name, tag)

Construct an image configuration.

Parameters
hoststringThe container registry host.
orgstringThe organization in the container registry.
teamstringThe team in the container registry.
namestringThe name of the container image.
tagstringThe tag of the container image.
Returns
image_configrunbooks.ImageConfigThe image configuration.

make_test_output

runbooks.make_test_output(result_type, result_json)

Create a test output for testing purposes. This is a helper function for creating fake test outputs.

Parameters
result_typestringThe type of test output (e.g., ‘health_check’).
result_jsonstringThe result data as a JSON string.
Returns
test_outputrunbooks.TestOutputThe created test output.

mnst_iperf

runbooks.mnst_iperf(cluster_config, hosts, orchestrator_hostname?, orchestrator_image?, iperf_image?, tests?, wfrun_timeout?)

Multi-node screen test for N/S IP network throughput via iperf

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
hostslist[runbooks.DatacenterNode]List of DatacenterNodes participating in the test.
orchestrator_hostname?optionalstringThe hostname of the orchestrator node.
orchestrator_image?optionalstringThe image URI containing multiperf.
iperf_image?optionalstringThe image URI containing an iperf binary.
tests?optionalstringThe tests to run.
wfrun_timeout?optionalstringTimeout for Wfrun.
Returns
resultsrunbooks.ResultsThe results of the test.

mnst_megatron

runbooks.mnst_megatron(cluster_config, hosts, orchestrator_hostname?, orchestrator_image?, pytorch_image?, megatron_args?, pretrain_gpt?, throughput?, slurm_reservation?, slurm_timeout?, wfrun_timeout?)

Generic wrapper around arbitrary megatron-lm pretrain_gpt.py tests.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
hostslist[runbooks.DatacenterNode]List of DatacenterNodes participating in the test.
orchestrator_hostname?optionalstringThe hostname of the orchestrator node.
orchestrator_image?optionalstringThe image URI containing multimegatron.
pytorch_image?optionalstringThe image URI containing the necessary CUDA drivers to run megatron-lm.
megatron_args?optionalstringArguments to pass to pretrain_gpt.py.
pretrain_gpt?optionalstringPath to pretrain_gpt.py, inclusive, from megatron-lm within a shared filesystem accessible to all nodes.
throughput?optionalstringAverage TFLOP/s that must be reached by each GPU to be considered passing. This is checked for every evaluation interval.
slurm_reservation?optionalstringSlurm reservation to run the tests within.
slurm_timeout?optionalstringTimeout for Slurm.
wfrun_timeout?optionalstringTimeout for Wfrun.
Returns
resultsrunbooks.ResultsThe results of the test.
runbooks.mnst_nvlink(cluster_config, hosts, orchestrator_hostname?, orchestrator_image?, pytorch_image?, nccl_tests?, nccl_tests_args?, constraints?, slurm_reservation?, slurm_timeout?, wfrun_timeout?)

Multi-node network test for NVLink connectivity via nccl-tests.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
hostslist[runbooks.DatacenterNode]List of DatacenterNodes participating in the test.
orchestrator_hostname?optionalstringThe hostname of the orchestrator node.
orchestrator_image?optionalstringThe image URI containing multiperf.
pytorch_image?optionalstringThe image URI containing an iperf binary.
nccl_tests?optionalstringThe NCCL tests to run.
nccl_tests_args?optionalstringArguments for the NCCL tests.
constraints?optionalstringConstraints for the tests.
slurm_reservation?optionalstringSlurm reservation to run the tests within.
slurm_timeout?optionalstringTimeout for Slurm.
wfrun_timeout?optionalstringTimeout for Wfrun.
Returns
resultsrunbooks.ResultsThe results of the test.

power_cycle_node

runbooks.power_cycle_node(cluster_config, node_id, fail_on_error?)

Power cycle a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to power cycle.
fail_on_error?optionalboolWhether to treat underlying errors as fatal (default true). When false, returns Success=false and message.
Returns
operation_resultrunbooks.OperationResultWhether the node was successfully power cycled.

power_reset_node

runbooks.power_reset_node(cluster_config, node_id, fail_on_error?)

Power reset a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to power reset.
fail_on_error?optionalboolWhether to treat underlying errors as fatal (default true). When false, returns Success=false and message.
Returns
operation_resultrunbooks.OperationResultWhether the node was successfully power reset.

set_power_state

runbooks.set_power_state(cluster_config, node_id, state)

Set the chassis power state of a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to control.
statestringThe desired power state: On, Off, ForceOff, GracefulShutdown, or ForceRestart.
Returns
resultrunbooks.SetPowerStateResultThe result indicating if the state was set.

single_node_validation

runbooks.single_node_validation(cluster_config, node_id, fail_fast?, perform_snst?, publish_eud_results?)

Run validation tests on a single node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to validate.
fail_fast?optionalboolWhether to fail on the first failure.
perform_snst?optionalboolWhether to run SNST tests (when feature flag enabled).
publish_eud_results?optionalboolRequire a durable direct-SSH EUD report for artifact-based reporting. Allows at most one eud feature per invocation. Requires objectstore; publication failures return an infrastructure error even when fail_fast is false. Legacy wfrun execution is unchanged.
Returns
test_resultsrunbooks.ResultsSingle node validation results.

test_suite_field_diags

runbooks.test_suite_field_diags(cluster_config, node_id, fail_fast?)

Run field diagnostics on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to run diagnostics on.
fail_fast?optionalboolWhether to fail on the first failure.
Returns
healthyrunbooks.TestSuiteFieldDiagsStarlarkResultWhether the node is healthy.

test_suite_gb200

runbooks.test_suite_gb200(cluster_config, node_id, fail_fast?)

Run the GB200 test suite on a node. Deprecated: Use test_suite_nccl_eud instead for consistent return type.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to run the GB200 test suite on.
fail_fast?optionalboolWhether to fail on the first failure. To do a screen test, set this to false.
Returns
healthyrunbooks.TestSuiteGb200ResultWhether the node is healthy.

test_suite_health_validation

runbooks.test_suite_health_validation(cluster_config, node_id)

Validate health of test suite for a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to validate.

test_suite_nccl_eud

runbooks.test_suite_nccl_eud(cluster_config, node_id, fail_fast?)

Run the GB200 test suite on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to run the GB200 test suite on.
fail_fast?optionalboolWhether to fail on the first failure. To do a screen test, set this to false.
Returns
test_resultsrunbooks.ResultsSingle node validation results.

triage_attempt_healthcheck

runbooks.triage_attempt_healthcheck(cluster_config, node_id)

Attempt to run a healthcheck for triage on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to run healthcheck on.
Returns
test_resultsrunbooks.ResultsTriage results.

triage_attempt_power_cycle

runbooks.triage_attempt_power_cycle(cluster_config, node_id)

Attempt to power cycle a node as part of triage.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to power cycle.
Returns
test_resultsrunbooks.ResultsTriage results.

triage_bmc_reset

runbooks.triage_bmc_reset(cluster_config, node_id)

Reset the BMC of a node as part of triage.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node whose BMC to reset.
Returns
test_resultsrunbooks.ResultsTriage results.

triage_default

runbooks.triage_default(cluster_config, node_id)

Run default triage operations on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to run default triage on.
Returns
test_resultsrunbooks.ResultsTriage results.

triage_gpu_temp_history

runbooks.triage_gpu_temp_history(cluster_config, node_id)

Check GPU temperature history on a node as part of triage.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to check GPU temperature history on.
Returns
test_resultsrunbooks.ResultsTriage results.

triage_ib_interface

runbooks.triage_ib_interface(cluster_config, node_id)

Run IB interface triage on a node.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to run IB interface triage on.
Returns
test_resultsrunbooks.ResultsTriage results.

triage_kill_task

runbooks.triage_kill_task(cluster_config, node_id)

Check whether a node drained with ‘Kill task failed’ is safe to return, without changing it.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to run kill task triage on.
Returns
test_resultsrunbooks.ResultsTriage results. Success means the node has no stuck processes, no GPU holders, enough disk space and a passing health check.

triage_mlx_fw_reset

runbooks.triage_mlx_fw_reset(cluster_config, node_id)

Reset Mellanox firmware on a node as part of triage.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to reset MLX firmware on.
Returns
test_resultsrunbooks.ResultsTriage results.

validate_host_present

runbooks.validate_host_present(cluster_config, node_id, fail_on_error?)

Validate that a host is present.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to validate.
fail_on_error?optionalboolWhether to fail on error.
Returns
resultrunbooks.OperationResultThe result of the validation.

verify_bmc_offline

runbooks.verify_bmc_offline(cluster_config, node_id)

Verify that a node’s BMC is offline (not responding).

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to check.
Returns
resultrunbooks.VerifyBmcOfflineResultThe result indicating if BMC is offline.

verify_bmc_online

runbooks.verify_bmc_online(cluster_config, node_id)

Verify that a node’s BMC is online (responding).

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to check.
Returns
resultrunbooks.VerifyBmcOnlineResultThe result indicating if BMC is online.

wait_boot

runbooks.wait_boot(cluster_config, node_id)

Wait for a node to boot by monitoring POST codes.

Parameters
cluster_configrunbooks.ClusterConfigThe cluster configuration.
node_idrunbooks.NodeIDThe ID of the node to monitor.
Returns
resultrunbooks.WaitBootResultThe result containing boot status and POST code.