controller

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	K8sPodsDirecotryName = "pods"

	FlexSuccessStr      = "Success"
	FlexFailureStr      = "Failure"
	FlexNotSupportedStr = "Not supported"
)
View Source
const BackendNotImplementedGetRealMountpointErrorStr = "Backend do not support getting the real mountpoint from PV"
View Source
const FailRemovePVorigDirErrorStr = "Failed removing existing volume directory"
View Source
const IdempotentDetachSkipOnVolumeNotExistWarnigMsg = "Detach operation requested to work on not exist volume. Assume its idempotent issue - so skip Detach."
View Source
const IdempotentIsAttachedSkipOnVolumeNotExistWarnigMsg = "IsAttached operation requested to work on not exist volume. Assume its idempotent issue - so skip IsAttached."
View Source
const IdempotentUnmountSkipOnVolumeNotExistWarnigMsg = "Unmount operation requested to work on not exist volume. Assume its idempotent issue - so skip Unmount."
View Source
const K8sPVDirectoryIsNotDirNorSlinkErrorStr = "k8s PV directory, k8s-mountpoint, is not a directory nor slink."
View Source
const K8sPVDirectoryIsNotSlinkErrorStr = "k8s PV directory, k8s-mountpoint, is not slink."
View Source
const MissingWwnMountRequestErrorStr = "volume related to scbe backend must have mountRequest.Opts[Wwn] not found (expect to have wwn for scbe backend volume type)"
View Source
const PVIsAlreadyUsedByAnotherPodMessage = "PV is already in use by another pod and has an existing slink to mountpoint."
View Source
const PvBackendNotSupportedErrorStr = "Backend type not supported."
View Source
const SpectrumScaleMissingMntPtVolumeErrorStr = "MountPoint Missing in Volume Config."
View Source
const SupportK8sVesion = "Support only k8s version >= 1.6."
View Source
const WrongSlinkErrorStr = "Idempotent - The existing slink point to a wrong mountpoint."

Variables

View Source
var WrongK8sDirectoryPathErrorMessage = fmt.Sprintf("Expected to find [%s] directory in k8s mount path.", K8sPodsDirecotryName)

Functions

This section is empty.

Types

type BackendNotImplementedGetRealMountpointError added in v1.2.0

type BackendNotImplementedGetRealMountpointError struct {
	Backend string
}

func (*BackendNotImplementedGetRealMountpointError) Error added in v1.2.0

type Controller

type Controller struct {
	Client resources.StorageClient
	// contains filtered or unexported fields
}

Controller this is a structure that controls volume management

func NewController

func NewController(logger *log.Logger, config resources.UbiquityPluginConfig) (*Controller, error)

NewController allows to instantiate a controller

func NewControllerWithClient

func NewControllerWithClient(logger *log.Logger, config resources.UbiquityPluginConfig, client resources.StorageClient, exec utils.Executor, mFactory mounter.MounterFactory) *Controller

NewControllerWithClient is made for unit testing purposes where we can pass a fake client

func (*Controller) Attach

Attach method attaches a volume to a host

func (*Controller) Detach

Detach detaches the volume/ fileset from the pod

func (*Controller) GetVolumeName

GetVolumeName checks if volume is attached

func (*Controller) Init

Init method is to initialize the k8sresourcesvolume

func (*Controller) IsAttached

IsAttached checks if volume is attached

func (*Controller) Mount

Mount method allows to mount the volume/fileset to a given location for a pod

func (*Controller) MountDevice

MountDevice mounts a device in a given location

func (*Controller) TestUbiquity added in v1.0.0

TestUbiquity method is to test connectivity to ubiquity

func (*Controller) Unmount

Unmount methods unmounts the volume from the pod

func (*Controller) UnmountDevice

UnmountDevice checks if volume is unmounted

func (*Controller) WaitForAttach

WaitForAttach Waits for a volume to get attached to the node

type FailRemovePVorigDirError added in v1.2.0

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

func (*FailRemovePVorigDirError) Error added in v1.2.0

func (e *FailRemovePVorigDirError) Error() string

type NoMounterForVolumeError added in v1.2.0

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

TODO need to remove this error, since its moved to ubiquity it self

func (*NoMounterForVolumeError) Error added in v1.2.0

func (e *NoMounterForVolumeError) Error() string

type PVIsAlreadyUsedByAnotherPod added in v1.2.0

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

func (*PVIsAlreadyUsedByAnotherPod) Error added in v1.2.0

type PvBackendNotSupportedError added in v1.2.0

type PvBackendNotSupportedError struct {
	Backend string
}

func (*PvBackendNotSupportedError) Error added in v1.2.0

type SpectrumScaleMissingMntPtVolumeError

type SpectrumScaleMissingMntPtVolumeError struct {
	VolumeName string
}

func (*SpectrumScaleMissingMntPtVolumeError) Error

type WrongK8sDirectoryPathError added in v1.2.0

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

func (*WrongK8sDirectoryPathError) Error added in v1.2.0

Jump to

Keyboard shortcuts

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