autohealer

package
v0.6.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMistralActionRetries        = 5
	DefaultMistralActionRetryDelay     = 60
	DefaultMistralActionExecutionCheck = 15
)
View Source
const (
	WorkflowExecutionSuccessState = "SUCCESS"
	WorkflowExecutionErrorState   = "ERROR"
)

There are 6 different states: IDLE, RUNNING, SUCCESS, ERROR, PAUSED, CANCELLED but we just handle two main states.

Variables

This section is empty.

Functions

This section is empty.

Types

type Healer

type Healer struct {
	model.Healer
	// contains filtered or unexported fields
}

Healer scrape metric from metrics backend periodically and evaluate whether it is necessary to do healing action

func (*Healer) Stop

func (h *Healer) Stop()

Stop Healer worker

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager controls name resolver and healer instances

func NewManager

func NewManager(l log.Logger, e *common.Etcd, c *cluster.Cluster) *Manager

NewManager create new Manager for name resolver and healer

func (*Manager) Reload

func (hm *Manager) Reload()

Reload stops and starts healers

func (*Manager) Run

func (hm *Manager) Run()

Run start healer mananer instance

func (*Manager) Stop

func (hm *Manager) Stop()

Stop destroy name resolver, healer and itself

type NResolver

type NResolver struct {
	model.NResolver
	// contains filtered or unexported fields
}

NResolver stands for name resolver it collects information from metrics backend which map instance IP to instance name

func (*NResolver) Stop

func (nr *NResolver) Stop()

Stop destroys name resolver instance

type NodeInfo

type NodeInfo struct {
	Instance string `json:"instance"`
	Nodename string `json:"nodename"`
}

NodeInfo contains information of node name and ip

type NodeMetric

type NodeMetric struct {
	CloudID string   `json:"cloudid"`
	Metric  NodeInfo `json:"metric"`
}

NodeMetric contains and ID and a metric

type WFLExecTracker

type WFLExecTracker struct {
	// contains filtered or unexported fields
}

WFLExecTracker tracks workflow execution and maxRetries if necessary

func NewTracker

func NewTracker(l log.Logger, mistralAct model.ActionMistral, os model.OpenStack) *WFLExecTracker

NewTracker spawns new execution tracker instance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL