Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultReplicaCount() int
- func GetDefaultFioArguments() []string
- func GetFioArgs() []string
- func GetFioImage() string
- func GetTestCaseLogsPath() (string, error)
- func NSMayastor() string
- func NSOpenEBS() string
- func ResetTestCaseLogsPath()
- func SanitizePathname(r rune) rune
- func SetTestCaseLogsPath(testcase string)
- type AllowVolumeExpansion
- type CloneFsIdAsVolumeIdType
- type CmpReplicas
- type ContentSource
- type E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) Build() ([]string, error)
- func (e *E2eFioArgsBuilder) GetTargets() []string
- func (e *E2eFioArgsBuilder) WithAdditionalArg(arg string) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithAdditionalArgs(args []string) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithArgumentSet(set FioAppArgsSet) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithBlockSize(val uint) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithCustomArgs(customArgs []string) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithDefaultArgs() *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithDefaultFile() *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithDefaultFileExt(fsAllocStrategy FioFsAllocation, units uint) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithDefaultRawBlock() *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithDirectIO(direct bool)
- func (e *E2eFioArgsBuilder) WithExitValue(exitValue int) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithFsFile(fsMount string, fileRelPath string) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithFsFileExt(fsMount string, fileRelPath string, fsAllocStrategy FioFsAllocation, ...) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithLiveness() *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithLivenessParameters(readInterval uint, timeout uint) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithLoops(val uint) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithRandRead() *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithRandReadWrite() *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithRandWrite() *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithRawBlock(devicePath string) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithRuntime(duration int) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithTargets(targets []string) *E2eFioArgsBuilder
- func (e *E2eFioArgsBuilder) WithZeroFill(val bool) *E2eFioArgsBuilder
- type E2eFioPodLogSynopsis
- type E2eFioPodOutputMonitor
- type ErrorAccumulator
- type Explicit
- type FileSystemType
- type FioAppArgsSet
- type FioExitRecord
- type FioFsAllocation
- type FioJsonRecords
- type FioTargetSizeRecord
- type Labelled
- type MayastorNode
- type MayastorNodeInterface
- type MayastorNodeSpec
- type MayastorNodeState
- type MayastorPool
- type MayastorPoolInterface
- type MayastorPoolSpec
- type MayastorPoolStatus
- type MayastorVolume
- type MayastorVolumeInterface
- type MsvReplica
- type MsvSpec
- type MsvState
- type Node_topology
- type OfflineSnapshot
- type OnOffVal
- type OnlineSnapshot
- type OpenEbsEngine
- type Policy
- type Pool_topology
- type ProvisioningType
- type Replica
- type ReplicaSnapshot
- type ReplicaTopology
- type ReplicaTopologyChildState
- type ReplicaUsage
- type ReplicasComparison
- type ShareProto
- type Snapshot
- type SnapshotDefinition
- type SnapshotMetadata
- type SnapshotSchema
- type SnapshotSpec
- type SnapshotState
- type SnapshotTransaction
- type SpecTarget
- type StateTarget
- type StsAffinityGroup
- type TargetChild
- type Topology
- type Usage
- type VolumeType
- type YesNoVal
Constants ¶
const DefaultFioSizeMb = 250
const DefaultIOTimeout = 60
const DefaultVolumeSizeMb = 312
const FioBlockFilename = "/dev/sdm"
const FioFsBlocksLessBy = "availblockslessby"
const FioFsBlocksPercent = "availblockspercent"
const FioFsFile = "fiotestfile"
const FioFsFilename = FioFsMountPoint + "/" + FioFsFile
const FioFsMountPoint = "/volume"
const FsxBlockFileName = "/dev/sdm"
const LargeClaimSizeMb = 1024
const MsvStatusStateOnline = "Online"
const NSDefault = "default"
const NSE2EAgent = "e2e-agent"
const NSE2EPrefix = "e2e-maya"
const ScCloneFsIdAsVolumeId = "cloneFsIdAsVolumeId"
const ScFsType = "fsType"
const ScIOTimeout = "ioTimeout"
LVM
const ScLvmStorage = "storage"
const ScLvmThinProvision = "thinProvision"
const ScLvmVgPattern = "vgpattern"
const ScLvmVgVolGroup = "volgroup"
const ScMaxSnapshots = "maxSnapshots"
const ScNodeAffinityTopologyLabel = "nodeAffinityTopologyLabel"
const ScNodeHasTopologyKey = "nodeHasTopologyKey"
const ScNodeSpreadTopologyKey = "nodeSpreadTopologyKey"
const ScNvmeCtrlLossTmo = "nvmeCtrlLossTmo"
const ScPoolAffinityTopologyLabel = "poolAffinityTopologyLabel"
const ScPoolHasTopologyKey = "poolHasTopologyKey"
const ScProtocol = "protocol"
Storageclass parameter keys
const ScReplicas = "repl"
const ScStsAffinityGroup = "stsAffinityGroup"
const ScThinProvisioning = "thin"
const ScZfsCompression = "compression"
const ScZfsDeDup = "dedup"
const ScZfsPoolName = "poolname"
const ScZfsRecordSize = "recordsize"
ZFS
const ScZfsThinProvision = "thinProvision"
const ScZfsVolBlockSize = "volblocksize"
const SmallClaimSizeMb = 312
const StrFioCriticalFailure = "fio Critical Failure"
Variables ¶
var XFSTestsBlockFilenames = []string{"/dev/test", "/dev/scratch"}
Functions ¶
func DefaultReplicaCount ¶
func DefaultReplicaCount() int
func GetDefaultFioArguments ¶
func GetDefaultFioArguments() []string
GetDefaultFioArguments return the default settings (arguments) for fio - for use with Mayastor
func GetFioArgs ¶
func GetFioArgs() []string
GetFioArgs return the default command line for fio - for use with Mayastor, for single volume
func GetFioImage ¶
func GetFioImage() string
func GetTestCaseLogsPath ¶
GetTestCaseLogsPath get the path to the logs directory for the current test case instance
func NSMayastor ¶
func NSMayastor() string
NSMayastor return the name of the namespace in which Mayastor is installed
func NSOpenEBS ¶
func NSOpenEBS() string
NSMayastor return the name of the namespace in which Mayastor is installed
func ResetTestCaseLogsPath ¶
func ResetTestCaseLogsPath()
ResetTestCaseLogsPath call when the test case has completed to clear state
func SanitizePathname ¶
SanitizePathname map helper function for runes used to create directories only allow A-Z, a-z, 0-9 and replace ' ' with '_'
func SetTestCaseLogsPath ¶
func SetTestCaseLogsPath(testcase string)
SetTestCaseLogsPath call at the start of test case
Types ¶
type AllowVolumeExpansion ¶
type AllowVolumeExpansion int
const ( AllowVolumeExpansionNone AllowVolumeExpansion = iota AllowVolumeExpansionEnable AllowVolumeExpansion = iota AllowVolumeExpansionDisable AllowVolumeExpansion = iota )
func (AllowVolumeExpansion) String ¶
func (CloneFsId AllowVolumeExpansion) String() string
type CloneFsIdAsVolumeIdType ¶
type CloneFsIdAsVolumeIdType int
const ( CloneFsIdAsVolumeIdNone CloneFsIdAsVolumeIdType = iota CloneFsIdAsVolumeIdEnable CloneFsIdAsVolumeIdType = iota CloneFsIdAsVolumeIdDisable CloneFsIdAsVolumeIdType = iota )
func (CloneFsIdAsVolumeIdType) String ¶
func (CloneFsId CloneFsIdAsVolumeIdType) String() string
type CmpReplicas ¶
type CmpReplicas int
const ( CmpReplicasMatch CmpReplicas = iota CmpReplicasMismatch CmpReplicas = iota CmpReplicasFailed CmpReplicas = iota )
type ContentSource ¶
type ContentSource struct {
Snapshot Snapshot `json:"snapshot"`
}
type E2eFioArgsBuilder ¶
type E2eFioArgsBuilder struct {
// contains filtered or unexported fields
}
func NewE2eFioArgsBuilder ¶
func NewE2eFioArgsBuilder() *E2eFioArgsBuilder
NewE2eFioArgsBuilder returns an instance of e2e fio args builder
func (*E2eFioArgsBuilder) Build ¶
func (e *E2eFioArgsBuilder) Build() ([]string, error)
func (*E2eFioArgsBuilder) GetTargets ¶
func (e *E2eFioArgsBuilder) GetTargets() []string
func (*E2eFioArgsBuilder) WithAdditionalArg ¶
func (e *E2eFioArgsBuilder) WithAdditionalArg(arg string) *E2eFioArgsBuilder
WithAdditionalArg use an additional fio arguments
func (*E2eFioArgsBuilder) WithAdditionalArgs ¶
func (e *E2eFioArgsBuilder) WithAdditionalArgs(args []string) *E2eFioArgsBuilder
WithAdditionalArgs use additional fio arguments
func (*E2eFioArgsBuilder) WithArgumentSet ¶
func (e *E2eFioArgsBuilder) WithArgumentSet(set FioAppArgsSet) *E2eFioArgsBuilder
func (*E2eFioArgsBuilder) WithBlockSize ¶
func (e *E2eFioArgsBuilder) WithBlockSize(val uint) *E2eFioArgsBuilder
WithBlockSize set fio block size
func (*E2eFioArgsBuilder) WithCustomArgs ¶
func (e *E2eFioArgsBuilder) WithCustomArgs(customArgs []string) *E2eFioArgsBuilder
WithCustomArgs use custom fio arguments
func (*E2eFioArgsBuilder) WithDefaultArgs ¶
func (e *E2eFioArgsBuilder) WithDefaultArgs() *E2eFioArgsBuilder
WithDefaultArgs use "standard" fio arguments
func (*E2eFioArgsBuilder) WithDefaultFile ¶
func (e *E2eFioArgsBuilder) WithDefaultFile() *E2eFioArgsBuilder
WithDefaultFile add the "standard" fio target on a filesystem the target file is created explicitly by e2e-fio before fio is launched
func (*E2eFioArgsBuilder) WithDefaultFileExt ¶
func (e *E2eFioArgsBuilder) WithDefaultFileExt(fsAllocStrategy FioFsAllocation, units uint) *E2eFioArgsBuilder
WithDefaultFileExt add the "standard" fio target on a filesystem the target file is created explicitly by e2e-fio before fio is launched
func (*E2eFioArgsBuilder) WithDefaultRawBlock ¶
func (e *E2eFioArgsBuilder) WithDefaultRawBlock() *E2eFioArgsBuilder
WithDefaultRawBlock add the "standard" fio target device
func (*E2eFioArgsBuilder) WithDirectIO ¶
func (e *E2eFioArgsBuilder) WithDirectIO(direct bool)
WithDirectIO set args for direct IO
func (*E2eFioArgsBuilder) WithExitValue ¶
func (e *E2eFioArgsBuilder) WithExitValue(exitValue int) *E2eFioArgsBuilder
WithExitValue add exit value override
func (*E2eFioArgsBuilder) WithFsFile ¶
func (e *E2eFioArgsBuilder) WithFsFile(fsMount string, fileRelPath string) *E2eFioArgsBuilder
WithFsFile add a fio target on a filesystem the target file is created explicitly by e2e-fio before fio is launched
func (*E2eFioArgsBuilder) WithFsFileExt ¶
func (e *E2eFioArgsBuilder) WithFsFileExt(fsMount string, fileRelPath string, fsAllocStrategy FioFsAllocation, units uint) *E2eFioArgsBuilder
WithFsFileExt add a fio target on a filesystem the target file is created explicitly by e2e-fio before fio is launched
func (*E2eFioArgsBuilder) WithLiveness ¶
func (e *E2eFioArgsBuilder) WithLiveness() *E2eFioArgsBuilder
WithLiveness add liveness checks for fio targets
func (*E2eFioArgsBuilder) WithLivenessParameters ¶
func (e *E2eFioArgsBuilder) WithLivenessParameters(readInterval uint, timeout uint) *E2eFioArgsBuilder
WithLivenessParameters add liveness checks for fio targets
func (*E2eFioArgsBuilder) WithLoops ¶
func (e *E2eFioArgsBuilder) WithLoops(val uint) *E2eFioArgsBuilder
WithLoops number of fio iterations over disk
func (*E2eFioArgsBuilder) WithRandRead ¶
func (e *E2eFioArgsBuilder) WithRandRead() *E2eFioArgsBuilder
WithRandRead verifies data written with previous RandWrite
func (*E2eFioArgsBuilder) WithRandReadWrite ¶
func (e *E2eFioArgsBuilder) WithRandReadWrite() *E2eFioArgsBuilder
WithRandReadWrite random reads and writes of target volume
func (*E2eFioArgsBuilder) WithRandWrite ¶
func (e *E2eFioArgsBuilder) WithRandWrite() *E2eFioArgsBuilder
WithRandWrite only writes to all blocks of target volume
func (*E2eFioArgsBuilder) WithRawBlock ¶
func (e *E2eFioArgsBuilder) WithRawBlock(devicePath string) *E2eFioArgsBuilder
WithRawBlock add a fio target device
func (*E2eFioArgsBuilder) WithRuntime ¶
func (e *E2eFioArgsBuilder) WithRuntime(duration int) *E2eFioArgsBuilder
WithRuntime set duration for time based run duration of 0 => no runtime limit
func (*E2eFioArgsBuilder) WithTargets ¶
func (e *E2eFioArgsBuilder) WithTargets(targets []string) *E2eFioArgsBuilder
WithTargets add an existing file as fio target used when a fio instance is launched to verify writes of a previous fio instance
func (*E2eFioArgsBuilder) WithZeroFill ¶
func (e *E2eFioArgsBuilder) WithZeroFill(val bool) *E2eFioArgsBuilder
WithZeroFill add commands to zerofill the targets
type E2eFioPodLogSynopsis ¶
type E2eFioPodLogSynopsis struct { Err error CriticalFailure bool Text []string JsonRecords FioJsonRecords }
func (*E2eFioPodLogSynopsis) String ¶
func (s *E2eFioPodLogSynopsis) String() string
type E2eFioPodOutputMonitor ¶
type E2eFioPodOutputMonitor struct { Completed bool Synopsis E2eFioPodLogSynopsis PodName string }
type ErrorAccumulator ¶
type ErrorAccumulator struct {
// contains filtered or unexported fields
}
func (*ErrorAccumulator) Accumulate ¶
func (acc *ErrorAccumulator) Accumulate(err error)
func (*ErrorAccumulator) GetError ¶
func (acc *ErrorAccumulator) GetError() error
type FileSystemType ¶
type FileSystemType string
const ( NoneFsType FileSystemType = "" Ext4FsType FileSystemType = "ext4" XfsFsType FileSystemType = "xfs" BtrfsFsType FileSystemType = "btrfs" ZfsFsType FileSystemType = "zfs" )
type FioAppArgsSet ¶
type FioAppArgsSet int
const ( DefaultFioArgs FioAppArgsSet = iota RandWriteFioArgs RandReadFioArgs CustomFioArgs NoFioArgs PerfSeqReadFioArgs PerfSeqWriteFioArgs PerfSeqMixedFioArgs PerfRandReadFioArgs PerfRandWriteFioArgs PerfRandMixedFioArgs RandReadWriteFioArgs )
func (FioAppArgsSet) String ¶
func (f FioAppArgsSet) String() string
type FioExitRecord ¶
type FioFsAllocation ¶
type FioFsAllocation int
const ( FioFsAllocDefault FioFsAllocation = iota FioFsAllocLessByBlocks FioFsAllocation = iota FioFsAllocPercentage FioFsAllocation = iota )
type FioJsonRecords ¶
type FioJsonRecords struct { ExitValues []FioExitRecord TargetSizes []FioTargetSizeRecord }
type FioTargetSizeRecord ¶
type MayastorNode ¶
type MayastorNode struct { Name string `json:"name"` Spec MayastorNodeSpec `json:"spec"` State MayastorNodeState `json:"state"` }
type MayastorNodeInterface ¶
type MayastorNodeInterface interface { GetMSN(node string) (*MayastorNode, error) ListMsns() ([]MayastorNode, error) }
type MayastorNodeSpec ¶
type MayastorNodeState ¶
type MayastorPool ¶
type MayastorPool struct { Name string `json:"name"` Spec MayastorPoolSpec `json:"spec"` Status MayastorPoolStatus `json:"status"` }
type MayastorPoolInterface ¶
type MayastorPoolInterface interface { GetMsPool(poolName string) (*MayastorPool, error) ListMsPools() ([]MayastorPool, error) }
type MayastorPoolSpec ¶
type MayastorPoolStatus ¶
type MayastorVolume ¶
type MayastorVolumeInterface ¶
type MayastorVolumeInterface interface { GetMSV(uuid string) (*MayastorVolume, error) GetMsvNodes(uuid string) (string, []string) DeleteMsv(volName string) error ListMsvs() ([]MayastorVolume, error) SetMsvReplicaCount(uuid string, replicaCount int) error GetMsvState(uuid string) (string, error) GetMsvReplicas(volName string) ([]Replica, error) GetMsvReplicaTopology(volUuid, replicaUuid string) (Replica, error) GetMsvReplicaTopologies(volUuid string) (ReplicaTopology, error) GetMsvNexusChildren(volName string) ([]TargetChild, error) GetMsvNexusState(uuid string) (string, error) IsMsvPublished(uuid string) bool IsMsvDeleted(uuid string) bool CheckForMsvs() (bool, error) CheckAllMsvsAreHealthy() error }
type MsvReplica ¶
MsvReplica contains replica Uri along with uuid and replica details. In older mayastor volume schema, replica Uri was present which is not the case in current version
type MsvSpec ¶
type MsvSpec struct { Num_replicas int `json:"num_replicas"` Size int64 `json:"size"` Status string `json:"status"` Target SpecTarget `json:"target"` Uuid string `json:"uuid"` Topology Topology `json:"topology"` Policy Policy `json:"policy"` Thin bool `json:"thin"` AsThin bool `json:"as_thin"` NumSnapshots int32 `json:"num_snapshots"` ContentSource ContentSource `json:"content_source"` MaxSnapshots int32 `json:"max_snapshots"` }
type MsvState ¶
type MsvState struct { Target StateTarget `json:"target"` Size int64 `json:"size"` Status string `json:"status"` Uuid string `json:"uuid"` ReplicaTopology ReplicaTopology `json:"replica_topology"` Usage Usage `json:"usage"` }
type Node_topology ¶
type Node_topology struct {
Explicit Explicit `json:"explicit"`
}
type OfflineSnapshot ¶
type OnlineSnapshot ¶
type OnlineSnapshot struct { UUID string `json:"uuid"` SourceID string `json:"source_id"` PoolID string `json:"pool_id"` PoolUUID string `json:"pool_uuid"` Timestamp string `json:"timestamp"` Size int64 `json:"size"` AllocatedSize int64 `json:"allocated_size"` PredecessorAllocSize int64 `json:"predecessor_alloc_size"` }
type OpenEbsEngine ¶
type OpenEbsEngine int
const ( Lvm OpenEbsEngine = iota Hostpath OpenEbsEngine = iota Zfs OpenEbsEngine = iota Mayastor OpenEbsEngine = iota )
func (OpenEbsEngine) String ¶
func (Engine OpenEbsEngine) String() string
type Pool_topology ¶
type Pool_topology struct {
Labelled Labelled `json:"labelled"`
}
type ProvisioningType ¶
type ProvisioningType int
const ( ThinProvisioning ProvisioningType = iota ThickProvisioning ProvisioningType = iota )
func (ProvisioningType) String ¶
func (provisioningType ProvisioningType) String() string
type Replica ¶
type Replica struct { Node string `json:"node"` Pool string `json:"pool"` State string `json:"state"` ChildStatus string `json:"child-status"` Usage ReplicaUsage `json:"usage"` }
type ReplicaSnapshot ¶
type ReplicaSnapshot struct { Online OnlineSnapshot `json:"online"` Offline OfflineSnapshot `json:"offline"` }
type ReplicaTopology ¶
type ReplicaTopologyChildState ¶
type ReplicaTopologyChildState int
const ( ChildStateOnline ReplicaTopologyChildState = iota ChildStateUnknown ReplicaTopologyChildState = iota ChildStateDegraded ReplicaTopologyChildState = iota ChildStateFaulted ReplicaTopologyChildState = iota )
func (ReplicaTopologyChildState) String ¶
func (replicaTopologyChildState ReplicaTopologyChildState) String() string
type ReplicaUsage ¶
type ReplicasComparison ¶
type ReplicasComparison struct { Result CmpReplicas Description string Err error }
type SnapshotDefinition ¶
type SnapshotDefinition struct { Metadata SnapshotMetadata `json:"metadata"` Spec SnapshotSpec `json:"spec"` }
type SnapshotMetadata ¶
type SnapshotSchema ¶
type SnapshotSchema struct { Definition SnapshotDefinition `json:"definition"` State SnapshotState `json:"state"` }
type SnapshotSpec ¶
type SnapshotState ¶
type SnapshotTransaction ¶
type SpecTarget ¶
type StateTarget ¶
type StsAffinityGroup ¶
type StsAffinityGroup string
const ( StsAffinityGroupDisable StsAffinityGroup = "false" StsAffinityGroupEnable StsAffinityGroup = "true" )
type TargetChild ¶
type Topology ¶
type Topology struct { NodeTopology Node_topology `json:"node_topology"` PoolTopology Pool_topology `json:"pool_topology"` }
type Usage ¶
type Usage struct { Capacity int64 `json:"capacity"` Allocated int64 `json:"allocated"` AllocatedReplica int64 `json:"allocated_replica"` AllocatedSnapshots int64 `json:"allocated_snapshots"` AllocatedAllSnapshots int64 `json:"allocated_all_snapshots"` TotalAllocated int64 `json:"total_allocated"` TotalAllocatedReplicas int64 `json:"total_allocated_replicas"` TotalAllocatedSnapshots int64 `json:"total_allocated_snapshots"` }
type VolumeType ¶
type VolumeType int
const ( VolFileSystem VolumeType = iota VolRawBlock VolumeType = iota VolTypeNone VolumeType = iota )
func (VolumeType) String ¶
func (volType VolumeType) String() string