vgmanager

package
v0.0.0-...-7a7d364 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName = "vg-manager"

	// NodeCleanupFinalizer should be set on a LVMVolumeGroup for every Node matching that LVMVolumeGroup.
	// When the LVMVolumeGroup gets deleted, this finalizer will stay on the VolumeGroup until the vgmanager instance
	// on that node has fulfilled all cleanup routines for the vg (remove lvs, vgs, pvs and lvmd conf entry).
	NodeCleanupFinalizer = "cleanup.vgmanager.node.topolvm.io"
)
View Source
const (
	OpenTargetMirror   = 'm'
	OpenTargetRaid     = 'r'
	OpenTargetSnapshot = 's'
	OpenTargetThin     = 't'
	OpenTargetUnknown  = 'u'
	OpenTargetVirtual  = 'v'
)
View Source
const (
	PartialTrue  = 'p'
	PartialFalse = '-'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationPolicy

type AllocationPolicy rune
const (
	AllocationPolicyAnywhere         AllocationPolicy = 'a'
	AllocationPolicyAnywhereLocked   AllocationPolicy = 'A'
	AllocationPolicyContiguous       AllocationPolicy = 'c'
	AllocationPolicyContiguousLocked AllocationPolicy = 'C'
	AllocationPolicyInherited        AllocationPolicy = 'i'
	AllocationPolicyInheritedLocked  AllocationPolicy = 'I'
	AllocationPolicyCling            AllocationPolicy = 'l'
	AllocationPolicyClingLocked      AllocationPolicy = 'L'
	AllocationPolicyNormal           AllocationPolicy = 'n'
	AllocationPolicyNormalLocked     AllocationPolicy = 'N'
	AllocationPolicyNone                              = '-'
)

type EventReasonError

type EventReasonError string
const EventReasonErrorDevicePathCheckFailed EventReasonError = "DevicePathCheckFailed"
const EventReasonErrorInconsistentLVs EventReasonError = "InconsistentLVs"
const EventReasonErrorNoAvailableDevicesForVG EventReasonError = "NoAvailableDevicesForVG"
const EventReasonErrorThinPoolCreateOrExtendFailed EventReasonError = "ThinPoolCreateOrExtendFailed"
const EventReasonErrorVGCreateOrExtendFailed EventReasonError = "VGCreateOrExtendFailed"

type EventReasonInfo

type EventReasonInfo string
const EventReasonLVMDConfigDeleted EventReasonInfo = "LVMDConfigDeleted"
const EventReasonLVMDConfigMissing EventReasonInfo = "LVMDConfigMissing"
const EventReasonLVMDConfigUpdated EventReasonInfo = "LVMDConfigUpdated"
const EventReasonVolumeGroupReady EventReasonInfo = "VolumeGroupReady"

type FilteredBlockDevice

type FilteredBlockDevice struct {
	lsblk.BlockDevice
	FilterErrors []error
}

type FilteredBlockDevices

type FilteredBlockDevices struct {
	Available []lsblk.BlockDevice
	Excluded  []FilteredBlockDevice
}

type LvAttr

LvAttr has mapped lv_attr information, see https://linux.die.net/man/8/lvs It is a complete parsing of the entire attribute byte flags that is attached to each LV. This is useful when attaching logic to the state of an LV as the state of an LV can be determined from the Attributes, e.g. for determining whether an LV is considered a Thin-Pool or not.

func ParsedLvAttr

func ParsedLvAttr(raw string) (LvAttr, error)

func (LvAttr) String

func (l LvAttr) String() string

type Minor

type Minor rune
const (
	MinorTrue  Minor = 'm'
	MinorFalse Minor = '-'
)

type Open

type Open rune
const (
	OpenTrue  Open = 'o'
	OpenFalse Open = '-'
)

type OpenTarget

type OpenTarget rune

type Partial

type Partial rune

type Permissions

type Permissions rune
const (
	PermissionsWriteable                             Permissions = 'w'
	PermissionsReadOnly                              Permissions = 'r'
	PermissionsReadOnlyActivationOfNonReadOnlyVolume Permissions = 'R'
	PermissionsNone                                  Permissions = '-'
)

type Reconciler

func (*Reconciler) NormalEvent

func (r *Reconciler) NormalEvent(ctx context.Context, obj *lvmv1alpha1.LVMVolumeGroup, reason EventReasonInfo, message string)

NormalEvent sends an event to both the nodeStatus, and the affected processed volumeGroup as well as the owning LVMCluster if present

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*Reconciler) WarningEvent

func (r *Reconciler) WarningEvent(ctx context.Context, obj *lvmv1alpha1.LVMVolumeGroup, reason EventReasonError, errMsg error)

WarningEvent sends an event to both the nodeStatus, and the affected processed volumeGroup as well as the owning LVMCluster if present

type State

type State rune
const (
	StateActive                                State = 'a'
	StateSuspended                             State = 's'
	StateInvalidSnapshot                       State = 'I'
	StateSuspendedSnapshot                     State = 'S'
	StateSnapshotMergeFailed                   State = 'm'
	StateSuspendedSnapshotMergeFailed          State = 'M'
	StateMappedDevicePresentWithoutTables      State = 'd'
	StateMappedDevicePresentWithInactiveTables State = 'i'
	StateNone                                  State = '-'
)

type VolumeType

type VolumeType rune
const (
	VolumeTypeMirrored                   VolumeType = 'm'
	VolumeTypeMirroredNoInitialSync      VolumeType = 'M'
	VolumeTypeOrigin                     VolumeType = 'o'
	VolumeTypeOriginWithMergingSnapshot  VolumeType = 'O'
	VolumeTypeRAID                       VolumeType = 'r'
	VolumeTypeRAIDNoInitialSync          VolumeType = 'R'
	VolumeTypeSnapshot                   VolumeType = 's'
	VolumeTypeMergingSnapshot            VolumeType = 'S'
	VolumeTypePVMove                     VolumeType = 'p'
	VolumeTypeVirtual                    VolumeType = 'v'
	VolumeTypeMirrorOrRAIDImage          VolumeType = 'i'
	VolumeTypeMirrorOrRAIDImageOutOfSync VolumeType = 'I'
	VolumeTypeMirrorLogDevice            VolumeType = 'l'
	VolumeTypeUnderConversion            VolumeType = 'c'
	VolumeTypeThinVolume                 VolumeType = 'V'
	VolumeTypeThinPool                   VolumeType = 't'
	VolumeTypeThinPoolData               VolumeType = 'T'
	VolumeTypeThinPoolMetadata           VolumeType = 'e'
	VolumeTypeNone                       VolumeType = '-'
)

type Zero

type Zero rune
const (
	ZeroTrue  Zero = 'z'
	ZeroFalse Zero = '-'
)

Directories

Path Synopsis
lvm

Jump to

Keyboard shortcuts

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