Skip to content

vllm.v1.fault_tolerance

Modules:

Classes:

Functions:

EngineCoreSentinel

Manages fault tolerance state for a single engine core.

Methods:

Attributes:

coordinator_disabled property

True once any scale_down has committed dead ranks. The DP wave wake-up path depends on the DP coordinator, which has no failover; after a scale_down the engine never idle-pauses and keeps stepping dummy batches instead.

_clear_contaminated_blocks()

Evict KV blocks possibly contaminated by the failed step.

_coordinate_recovery_store_port(master_ip, recovery_round, is_master)

Create (is_master) or look up (others) the per-round TCPStore that workers use to coordinate reinit ports; return its port.

_drain_batch_queue()

Drain the batch queue, feeding leftover kv_connector_outputs to the scheduler via update_from_output() with an empty SchedulerOutput.

_install_executor_failure_callback()

Report executor failure to the sentinel as well.

The busy loop cannot consume EXECUTOR_FAILED while it waits for recovery, so the sentinel must observe the failure directly.

_prepare_round(ft_request, dead_ranks=None)

Fill the round's coordination params.

The round's rendezvous keys are namespaced by request_id, so every engine must carry the same one.

_push_status(mask=None)

Push current health to the client so it can refresh its cache.

_query_mask()

Union of all workers' all2all masks.

A rank is excluded if any worker suspects it.

_rebuild_dp_store(host, port, is_master, num_clients)

Rebuild dp_store when the old store master was removed.

_recover_and_vote(ft_request, terminal)

Reinit the engine groups, dispatch the command to workers, then all surviving engines vote one success bit over the rebuilt DP group so they commit or fail together. Any failure is terminal when terminal is set; otherwise the engine stays UNHEALTHY, retryable.

_reinit_engine_groups(dense_rank, dense_size, recovery_round)

Reinit the engine DP group (dp>1). Worker group ports are coordinated by the workers themselves via the recovery store.

_reinit_groups(ft_request)

Reinit the engine DP group (dp>1) and host the recovery store.

activate_cpu_group_timeouts()

Give startup-created gloo groups the configured cpu timeout.

handle_command(client_idx, call_id, ft_args)

Dispatch an FT command by instruction name.

on_executor_failed()

Notify the client about the executor failure

on_fault(exc)

Called by the wrapper when the busy loop raises an exception.

fault_tolerant_wrapper(busy_loop_func)

Wrap the busy loop to catch faults and delegate recovery.