Documentation
¶
Overview ¶
Package provision runs the PROVISIONING workflow's asynchronous part: placement and reservation happen when a server is created; this worker resolves the server's software to an exact build, makes sure the artifact is in the Controller's cache, records it on the server and pushes the spec to the Node. A server that cannot be provisioned within the deadline becomes FAILED with a condition saying why.
It also obtains the new software of servers whose version is being changed (UPDATING); if that fails, they keep their current software.
Everything it needs is in the database, so it picks up where it left off after a Controller restart.
Index ¶
Constants ¶
const ConditionID = "provisioning"
ConditionID is the Controller condition a failed provisioning leaves.
const DefaultDeadline = 10 * time.Minute
DefaultDeadline is how long a server may stay in PROVISIONING.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Store *store.Store
Catalog *catalog.Catalog
Cache *artifacts.Cache
Notifier Notifier
Logger *slog.Logger
// Deadline defaults to DefaultDeadline, Interval (between passes) to
// 15 seconds, Now to time.Now.
Deadline time.Duration
Interval time.Duration
Now func() time.Time
}
Config wires the worker.