probe

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: GPL-3.0, LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerRunning

func ContainerRunning(ctx context.Context, client *docker.Client, name docker.ContainerName) error

ContainerRunning verifies that the container is in the "running" state.

func MungeReady

func MungeReady(ctx context.Context, client *docker.Client, name docker.ContainerName) error

MungeReady verifies that the munge authentication service is active.

func SSHDReady

func SSHDReady(ctx context.Context, client *docker.Client, name docker.ContainerName) error

SSHDReady verifies that sshd is accepting connections and responding with the SSH protocol banner on port 22.

func SlurmctldReady

func SlurmctldReady(ctx context.Context, client *docker.Client, name docker.ContainerName) error

SlurmctldReady verifies that slurmctld is responding to RPC requests.

func SlurmdReady

func SlurmdReady(ctx context.Context, client *docker.Client, name docker.ContainerName) error

SlurmdReady verifies that the slurmd service is active.

func SystemdReady

func SystemdReady(ctx context.Context, client *docker.Client, name docker.ContainerName) error

SystemdReady verifies that systemd has finished booting. Both "running" and "degraded" are considered ready, since degraded means systemd completed startup but some units failed (which is expected when Slurm daemons haven't been configured yet).

func UntilReady

func UntilReady(ctx context.Context, client *docker.Client, name docker.ContainerName, probes []Probe, interval time.Duration) error

UntilReady polls the given probes until they all pass or the context expires. The caller controls the deadline via the context. The interval controls the delay between polling attempts. On timeout, the error includes the name and message of the last failing probe.

Types

type Func

type Func func(ctx context.Context, client *docker.Client, name docker.ContainerName) error

Func is a probe function that checks a single readiness condition.

type Probe

type Probe struct {
	Name  string
	Check Func
}

Probe is a named readiness check.

func NodeProbes

func NodeProbes(role string) []Probe

NodeProbes returns the probes applicable to a node with the given role.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL