Skip to main content

Module probe

Module probe 

Source
Expand description

Probe orchestration and the probes shared by every OS.

probe_capabilities runs every probe against a ProbeHost and returns capabilities plus notes. It never assumes: a capability is emitted only when a probe saw it (probed), was told about it by the operator (claimed), or a harness measured it (measured).

Structs§

Collected
Probe output: capabilities plus notes explaining them.
EmulationCache
Remembers what the privileged emulation probe (docker run --privileged) listed, so it runs once per ttl and not on every facts refresh.
ProbeConfig
What the probe is told rather than what it sees.

Constants§

DEFAULT_FACTS_TTL_SECS
Default TTL for self-probed facts (ten minutes).
MAX_IMAGE_REF_LEN
Longest accepted container image reference.

Functions§

build_facts
Probe this machine and wrap the result as unsigned NodeFacts.
bytes_attr
Clamp a byte count into an Int attribute.
cap
Build a capability, or None if the id is not valid (for example an arch string from a tool that does not fit the id grammar).
normalize_arch
Canonical arch name for ids and arches_* lists.
parse_df
Parse df -kP <path> output: (available bytes, mount point).
probe_capabilities
Run every probe. Order: cpu/os, memory, storage, runtimes, accelerators, formats, feeds, measured.
refresh_live
Cheap live refresh of base: only free memory is re-read (no container engine, no subprocess beyond vm_stat / /proc/meminfo). Capability states are carried over from base; the caller owns busy tracking.
str_list
A list attribute of strings.
valid_image_ref
True for a plausible local image reference: [A-Za-z0-9][A-Za-z0-9._/:@-]*. Rejects a leading - (it would be read as an option by docker), spaces and any shell or control character.