Documentation
¶
Index ¶
- func HealthyForRuntimeAdmission(decision Decision) bool
- type CPU
- type CommandRunner
- type Decision
- type ExecRunner
- type Filesystem
- type Finding
- type KVM
- type LegacyRunners
- type Maintenance
- type Memory
- type OperatingSystem
- type Pressure
- type PressureResource
- type PressureWindow
- type Severity
- type Snapshot
- type Software
- type SoftwareVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthyForRuntimeAdmission ¶
HealthyForRuntimeAdmission separates immutable/runtime host failures from resource pressure that the admission journal evaluates against the complete Incus allocation set. Capacity, live available memory, disk and inode findings remain fail-closed in admission; only their accounting moves to the layer that can atomically reserve or preempt speculative warm capacity.
One-minute load is delegated only on a dedicated host, and the distinction is not cosmetic. On a retained-workloads host, load is the single signal about consumption the journal cannot see, because the legacy listeners and the retained application stacks are not fleet VMs; it must stay a blocker there. On a dedicated host the fleet is the only consumer, the journal already holds exact per-VM CPU-unit accounting against project_max_cpu_units, and the proxy contributes a feedback loop instead of safety: one 4-vCPU worker takes an 8-core host past any reserve on its own, so the host then refuses to replenish the warm VM it just consumed, and each refusal keeps load high enough to refuse the next one.
It remains a blocker in the cold-pilot decision for both modes, because that is an operator gate rather than an automatic retry.
Types ¶
type CommandRunner ¶
type Decision ¶
type Decision struct {
PilotReady bool `json:"pilot_ready"`
Pool string `json:"pool"`
HostReserveMode string `json:"host_reserve_mode,omitempty"`
RequiredCPUUnits int `json:"required_cpu_units"`
RequiredMemoryMiB int `json:"required_memory_mib"`
RequiredFreeDiskPercent int `json:"required_free_disk_percent"`
Findings []Finding `json:"findings"`
}
func EvaluateColdPilot ¶
EvaluateColdPilot fails closed against the same host reserve and pool resource policy used by runtime admission. Legacy listeners and workers are reported but are not treated as a blocker because coexistence is required.
func EvaluateContainerImageBuild ¶
func EvaluateContainerImageBuild(snapshot Snapshot, reserve config.HostReserve, pool config.Pool) Decision
EvaluateContainerImageBuild verifies the host that will build and smoke an Incus container image. It deliberately excludes KVM and nested-KVM: neither participates in a container build. A pending host reboot remains visible but cannot invalidate image bytes produced entirely in the container userspace; runtime capacity and failed fleet dependencies still fail closed.
type ExecRunner ¶
type ExecRunner struct{}
type Filesystem ¶
type Filesystem struct {
Source string `json:"source"`
Type string `json:"type"`
TotalMiB uint64 `json:"total_mib"`
AvailableMiB uint64 `json:"available_mib"`
FreePercent int `json:"free_percent"`
FreeInodesPercent int `json:"free_inodes_percent"`
Rotational bool `json:"rotational"`
RotationalKnown bool `json:"rotational_known"`
}
type LegacyRunners ¶
type Maintenance ¶
type Maintenance struct {
RebootRequired bool `json:"reboot_required"`
SystemState string `json:"system_state"`
// FailedUnits names the failed systemd services behind a degraded
// SystemState. The aggregate alone cannot distinguish a failed fleet
// dependency from an unrelated unit, and admission must not close the
// whole host for the second kind.
FailedUnits []string `json:"failed_units,omitempty"`
}
type OperatingSystem ¶
type Pressure ¶
type Pressure struct {
Available bool `json:"available"`
CPU PressureResource `json:"cpu"`
Memory PressureResource `json:"memory"`
IO PressureResource `json:"io"`
}
type PressureResource ¶
type PressureResource struct {
Some PressureWindow `json:"some"`
Full PressureWindow `json:"full"`
}
type PressureWindow ¶
type Snapshot ¶
type Snapshot struct {
SchemaVersion int `json:"schema_version"`
CapturedAt string `json:"captured_at"`
Hostname string `json:"hostname"`
OperatingSystem OperatingSystem `json:"operating_system"`
Virtualization string `json:"virtualization"`
CPU CPU `json:"cpu"`
Memory Memory `json:"memory"`
Pressure Pressure `json:"pressure"`
RootFilesystem Filesystem `json:"root_filesystem"`
KVM KVM `json:"kvm"`
Maintenance Maintenance `json:"maintenance"`
Software Software `json:"software"`
LegacyRunners LegacyRunners `json:"legacy_runners"`
}
Snapshot is a read-only, secret-free observation of one Linux runner host. It is intentionally small enough to persist alongside deployment audit records and stable enough to compare before and after maintenance.
type Software ¶
type Software struct {
Incus SoftwareVersion `json:"incus"`
Docker SoftwareVersion `json:"docker"`
}