diff --git a/docs/reservations/committed-resource-reservations.md b/docs/reservations/committed-resource-reservations.md index c1dc53674..3775f34b2 100644 --- a/docs/reservations/committed-resource-reservations.md +++ b/docs/reservations/committed-resource-reservations.md @@ -288,7 +288,8 @@ The `Reservation` controller watches `Reservation` CRDs and `Hypervisor` CRDs. ` **Allocation Verification** — tracks VM lifecycle on reservations. The controller uses the Hypervisor CRD as the sole source of truth, with two triggers: - New VMs (within `committedResourceAllocationGracePeriod`, default: 15 min): verification deferred — VM may still be spawning; requeued every `committedResourceRequeueIntervalGracePeriod` (default: 1 min) - Established VMs: verified reactively when the Hypervisor CRD changes (VM appeared or disappeared in `Status.Instances`), with `committedResourceRequeueIntervalActive` (default: 5 min) as a safety-net fallback -- Missing VMs: removed from `Spec.Allocations` when not found on the Hypervisor CRD after the grace period +- Missing unconfirmed VMs (in `Spec.Allocations` only): removed from `Spec.Allocations` when not found on the Hypervisor CRD after the grace period +- Missing confirmed VMs (already present in `Status.Allocations`): bypass the grace period entirely — their disappearance from the Hypervisor CRD is treated as authoritative and they are removed immediately **Reservation migration is not supported yet.** diff --git a/docs/reservations/failover-reservations.md b/docs/reservations/failover-reservations.md index 34a6ccc3f..c2af22a8e 100644 --- a/docs/reservations/failover-reservations.md +++ b/docs/reservations/failover-reservations.md @@ -5,13 +5,14 @@ The failover reservation system ensures VMs have pre-reserved capacity on altern ## File Structure ```text -internal/scheduling/reservations/failover/ -├── config.go # Configuration struct (intervals, flavor requirements) -├── controller.go # Handles lifecycle of Reservation CRD of type failover -├── vm_source.go # VM data source (reads from Nova DB via postgres) -├── reservation_eligibility.go # Checks if a VM can use a failover reservation from a HA perspective (independent of normal scheduling constraints) -├── reservation_scheduling.go # Scheduling (new and reusing) of failover reservations via our scheduling pipeline -└── helpers.go # Utility functions for reservation manipulation +internal/scheduling/reservations/ +├── vm_source.go # Shared VM data source interface (used by failover, commitments, and quota controllers) +└── failover/ + ├── config.go # Configuration struct (intervals, flavor requirements) + ├── controller.go # Handles lifecycle of Reservation CRD of type failover + ├── reservation_eligibility.go # Checks if a VM can use a failover reservation from a HA perspective (independent of normal scheduling constraints) + ├── reservation_scheduling.go # Scheduling (new and reusing) of failover reservations via our scheduling pipeline + └── helpers.go # Utility functions for reservation manipulation ``` ## Reconciliation Flow @@ -114,7 +115,7 @@ The main orchestrator with dual reconciliation: ### 2. VM Source (`vm_source.go`) -Interface `VMSource` with `DBVMSource` implementation: +Shared interface `VMSource` (located at `internal/scheduling/reservations/vm_source.go`) used by failover, commitments, and quota controllers: - Reads VMs from Nova postgres database (servers + flavors join) - Can trust either postgres (`OSEXTSRVATTRHost`) or Hypervisor CRD for VM location - Returns `VM` structs with UUID, flavor, resources, extra specs, AZ