issues

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLastErrorThreshold

func DefaultLastErrorThreshold() time.Duration

func NewIssueFromType

func NewIssueFromType(t Type) (issue, error)

Types

type Config

type Config struct {
	// Machines are the machines to evaluate issues for
	Machines metal.Machines
	// EventContainers are the event containers of the machines to evaluate issues for
	// if not provided the machines will have a no-event-container issue
	EventContainers metal.ProvisioningEventContainers
	// Severity filters issues for the given severity
	Severity Severity
	// Only includes only the given issue types
	Only []Type
	// Omit omits the given issue types, this has precedence over only
	Omit []Type
	// LastErrorThreshold specifies for how long in the past the last event error is counted as an error
	LastErrorThreshold time.Duration
}

Config contains configuration parameters for finding machine issues

type Issue

type Issue struct {
	// Type specifies the issue type (id)
	Type Type
	// Severity specifies the severity of an issue
	Severity Severity
	// Description provides an issue description
	Description string
	// RefURL provides a link to a more detailed issue description in the metal-stack documentation
	RefURL string
	// Details may contain additional details on an evaluated issue
	Details string
}

Issue formulates an issue of a machine

type Issues

type Issues []Issue

Issues is a list of issues

func All

func All() Issues

type MachineIssues

type MachineIssues []*MachineWithIssues

MachineIssues is map of a machine response to a list of machine issues

func (MachineIssues) Get

func (mis MachineIssues) Get(id string) *MachineWithIssues

type MachineIssuesMap

type MachineIssuesMap map[string]*MachineWithIssues

MachineIssuesMap is a map of machine issues with the machine id as a map key

func Find

func Find(c *Config) (MachineIssuesMap, error)

func (MachineIssuesMap) ToList

func (mim MachineIssuesMap) ToList() MachineIssues

type MachineWithIssues

type MachineWithIssues struct {
	Machine *metal.Machine
	Issues  Issues
}

MachineWithIssues summarizes a machine with issues

type Severity

type Severity string
const (
	// SeverityMinor is an issue that should be checked from time to time but has no bad effects for the user.
	SeverityMinor Severity = "minor"
	// SeverityMajor is an issue where user experience is affected or provider resources are wasted.
	// overall functionality is still maintained though. major issues should be resolved as soon as possible.
	SeverityMajor Severity = "major"
	// SeverityCritical is an issue that can lead to disfunction of the system and need to be handled as quickly as possible.
	SeverityCritical Severity = "critical"
)

func AllSevereties

func AllSevereties() []Severity

func SeverityFromString

func SeverityFromString(input string) (Severity, error)

func (Severity) LowerThan

func (s Severity) LowerThan(o Severity) bool

type Type

type Type string
const (
	TypeASNUniqueness Type = "asn-not-unique"
)
const (
	TypeBMCInfoOutdated Type = "bmc-info-outdated"
)
const (
	TypeBMCWithoutIP Type = "bmc-without-ip"
)
const (
	TypeBMCWithoutMAC Type = "bmc-without-mac"
)
const (
	TypeCrashLoop Type = "crashloop"
)
const (
	TypeFailedMachineReclaim Type = "failed-machine-reclaim"
)
const (
	TypeLastEventError Type = "last-event-error"
)
const (
	TypeLivelinessDead Type = "liveliness-dead"
)
const (
	TypeLivelinessNotAvailable Type = "liveliness-not-available"
)
const (
	TypeLivelinessUnknown Type = "liveliness-unknown"
)
const (
	TypeNoEventContainer Type = "no-event-container"
)
const (
	TypeNoPartition Type = "no-partition"
)
const (
	TypeNonDistinctBMCIP Type = "bmc-no-distinct-ip"
)

func AllIssueTypes

func AllIssueTypes() []Type

func NotAllocatableIssueTypes

func NotAllocatableIssueTypes() []Type

Jump to

Keyboard shortcuts

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