v0

package
v0.0.0-...-19cdec1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanConnect

func CanConnect() bool

CanConnect retrieve the cached connectable state to Mayastor instances on the cluster under test

func CheckAndSetConnect

func CheckAndSetConnect(nodes []string) error

CheckAndSetConnect call to cache connectable state to Mayastor instances on the cluster under test Just dialing does not work, we need to make a simple gRPC call (GetMayastorInfo)

func CreateReplica

func CreateReplica(address string, uuid string, size uint64, pool string) error

CreateReplica create a replica on a mayastor node, with parameters

 thin fixed to false and share fixed to NVMF.
Other parameters must be specified

func CreateReplicaExt

func CreateReplicaExt(address string, uuid string, size uint64, pool string, thin bool) error

CreateReplicaExt create a replica on a mayastor node

func DestroyAllPools

func DestroyAllPools(addrs []string) error

func DestroyPool

func DestroyPool(name, addr string) error

func FaultNexusChild

func FaultNexusChild(address string, Uuid string, Uri string) error

func FindReplicas

func FindReplicas(uuid string, addrs []string) ([]v0MayastorReplica, error)

FindReplicas given a list of node ip addresses, enumerate the set of replicas on mayastor using gRPC on each of those nodes returns accumulated errors if gRPC communication failed.

func GetPool

func GetPool(name, addr string) (*v0MayastorPool, error)

func ListNvmeControllers

func ListNvmeControllers(addrs []string) ([]v0NvmeController, error)

ListNvmeControllers given a list of node ip addresses, enumerate the set of nvmeControllers on mayastor using gRPC on each of those nodes returns accumulated errors if gRPC communication failed.

func ListPools

func ListPools(addrs []string) ([]v0MayastorPool, error)

ListPools given a list of node ip addresses, enumerate the set of pools on mayastor using gRPC on each of those nodes returns accumulated errors if gRPC communication failed.

func ListReplicas

func ListReplicas(addrs []string) ([]v0MayastorReplica, error)

ListReplicas given a list of node ip addresses, enumerate the set of replicas on mayastor using gRPC on each of those nodes returns accumulated errors if gRPC communication failed.

func RmNodeReplicas

func RmNodeReplicas(addrs []string) error

RmNodeReplicas given a list of node ip addresses, delete the set of replicas on mayastor using gRPC on each of those nodes returns errors if gRPC communication failed.

func RmReplica

func RmReplica(address string, uuid string) error

RmReplica remove a replica identified by node and uuid

func ShareBdev

func ShareBdev(address string, bdevUuid string) (string, error)

ShareBdev share a bdev with uuid

func UnshareBdev

func UnshareBdev(address string, bdevUuid string) error

UnshareBdev unshare a bdev with uuid

Types

type V0MayastorNexus

type V0MayastorNexus struct {
	Name      string                  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Uuid      string                  `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Size      uint64                  `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	State     mayastorGrpc.NexusState `protobuf:"varint,3,opt,name=state,proto3,enum=mayastor.NexusState" json:"state,omitempty"`
	Children  []*mayastorGrpc.Child   `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"`
	DeviceUri string                  `protobuf:"bytes,5,opt,name=device_uri,json=deviceUri,proto3" json:"device_uri,omitempty"`
	Rebuilds  uint32                  `protobuf:"varint,6,opt,name=rebuilds,proto3" json:"rebuilds,omitempty"`
}

V0MayastorNexus Mayastor Nexus data

func FindNexus

func FindNexus(uuid string, addrs []string) (*V0MayastorNexus, error)

FindNexus given a list of node ip addresses, return the V0MayastorNexus with matching uuid returns accumulated errors if gRPC communication failed.

func ListNexuses

func ListNexuses(addrs []string) ([]V0MayastorNexus, error)

ListNexuses given a list of node ip addresses, enumerate the set of nexuses on mayastor using gRPC on each of those nodes returns accumulated errors if gRPC communication failed.

func (V0MayastorNexus) GetChildren

func (msn V0MayastorNexus) GetChildren() []v0MayastorNexusChild

func (V0MayastorNexus) GetSize

func (msn V0MayastorNexus) GetSize() uint64

func (V0MayastorNexus) GetStateString

func (msn V0MayastorNexus) GetStateString() string

func (V0MayastorNexus) GetString

func (msn V0MayastorNexus) GetString() string

func (V0MayastorNexus) GetUuid

func (msn V0MayastorNexus) GetUuid() string

type V0RebuildStatsReply

type V0RebuildStatsReply struct {
	BlocksTotal     uint64 `protobuf:"varint,1,opt,name=blocks_total,json=blocksTotal,proto3" json:"blocks_total,omitempty"`               // total number of blocks to recover
	BlocksRecovered uint64 `protobuf:"varint,2,opt,name=blocks_recovered,json=blocksRecovered,proto3" json:"blocks_recovered,omitempty"`   // number of blocks recovered
	Progress        uint64 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"`                                        // rebuild progress %
	SegmentSizeBlks uint64 `protobuf:"varint,4,opt,name=segment_size_blks,json=segmentSizeBlks,proto3" json:"segment_size_blks,omitempty"` // granularity of each recovery copy in blocks
	BlockSize       uint64 `protobuf:"varint,5,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`                     // size in bytes of each block
	TasksTotal      uint64 `protobuf:"varint,6,opt,name=tasks_total,json=tasksTotal,proto3" json:"tasks_total,omitempty"`                  // total number of concurrent rebuild tasks
	TasksActive     uint64 `protobuf:"varint,7,opt,name=tasks_active,json=tasksActive,proto3" json:"tasks_active,omitempty"`               // number of current active tasks
}

func GetRebuildStats

func GetRebuildStats(uuid string, dstUri string, addrs string) (V0RebuildStatsReply, error)

GetRebuildStats given a node ip address, return the V0RebuildHistory with matching uuid and uri returns accumulated errors if gRPC communication failed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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