Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( PerformUpgrade = upgrades.PerformUpgrade // UpgradeStartTimeoutController the maximum time a controller will // wait for other controllers to come up and indicate they are ready // to begin running upgrade steps. UpgradeStartTimeoutController = time.Minute * 15 )
TODO (manadart 2021-05-18): These are exported for tests and in the case of the timeout, for feature tests. That especially should be a dependency of the worker.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency manifold that runs an upgrader worker, using the resource names defined in the supplied config.
func NewLock ¶
NewLock creates a gate.Lock to be used to synchronise workers which need to start after upgrades have completed. The returned Lock should be passed to NewWorker. If the agent has already upgraded to the current version, then the lock will be returned in the released state.
func NewWorker ¶
func NewWorker( upgradeComplete gate.Lock, agent agent.Agent, apiConn api.Connection, isController bool, openState func() (*state.StatePool, error), preUpgradeSteps upgrades.PreUpgradeStepsFunc, entity StatusSetter, isCaas bool, ) (worker.Worker, error)
NewWorker returns a new instance of the upgradeSteps worker. It will run any required steps to upgrade to the currently running Juju version.
Types ¶
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string APICallerName string UpgradeStepsGateName string OpenStateForUpgrade func() (*state.StatePool, error) PreUpgradeSteps upgrades.PreUpgradeStepsFunc NewAgentStatusSetter func(apiConn api.Connection) (StatusSetter, error) }
ManifoldConfig defines the names of the manifolds on which a Manifold will depend.