Documentation
¶
Overview ¶
Package evacuate adapts host-evacuation orchestration to the jobs runner.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Svc *instance.Service
Jobs store.JobStore
Metrics jobs.Metrics // optional; nil-safe
// Concurrency is the default child-migration bound (0 -> defaultEvacuateConcurrency).
// A request's Concurrency overrides it per call. See effectiveConcurrency.
Concurrency int
// contains filtered or unexported fields
}
Handler runs "evacuate" jobs: resolve the host's instances into a migrate plan, run the migrations with bounded concurrency (each as a child migrate job), and aggregate onto the parent.
A parent evacuate occupies one runner pool worker for the whole fan-out (its children run as goroutines inside it and need no worker). That keeps a single evacuate deadlock-free, but a parent holds its worker for the duration, so many concurrent evacuates can starve plain migrate/other jobs of a slot. Acceptable at current scale; if many concurrent evacuates become common, give the runner headroom or a separate orchestration pool.