Documentation ¶
Index ¶
- func CanConnect() bool
- func CheckAndSetConnect(nodes []string) error
- func ChecksumReplica(address string, replicaUuid string, poolName string) (uint32, error)
- func CreateReplica(address string, uuid string, size uint64, pool string) error
- func CreateReplicaExt(address string, uuid string, size uint64, pool string, thin bool) error
- func DestroyAllPools(addrs []string) error
- func DestroyPool(name, address string) error
- func FaultNexusChild(address string, Uuid string, Uri string) error
- func FindReplicas(uuid string, addrs []string) ([]v1MayastorReplica, error)
- func GetPool(name, addr string) (*v1MayastorPool, error)
- func ListNvmeControllers(addrs []string) ([]v1NvmeController, error)
- func ListPools(addrs []string) ([]v1MayastorPool, error)
- func ListReplicas(addrs []string) ([]v1MayastorReplica, error)
- func ResetIOStats(address string) error
- func RmNodeReplicas(addrs []string) error
- func RmReplica(address string, uuid string) error
- func ShareBdev(address string, bdevUuid string) (string, error)
- func UnshareBdev(address string, bdevUuid string) error
- func WipeReplica(address string, replicaUuid string, poolName string) error
- type V1MayastorNexus
- type V1RebuildHistory
- type V1RebuildStatsResponse
- func (h V1RebuildStatsResponse) GetBlockSize() uint64
- func (h V1RebuildStatsResponse) GetBlocksPerTask() uint64
- func (h V1RebuildStatsResponse) GetBlocksRecovered() uint64
- func (h V1RebuildStatsResponse) GetBlocksRemaining() uint64
- func (h V1RebuildStatsResponse) GetBlocksTotal() uint64
- func (h V1RebuildStatsResponse) GetBlocksTransferred() uint64
- func (h V1RebuildStatsResponse) GetProgress() uint64
- func (h V1RebuildStatsResponse) GetStartTime() *timestamppb.Timestamp
- func (h V1RebuildStatsResponse) GetTasksActive() uint64
- func (h V1RebuildStatsResponse) GetTasksTotal() uint64
- func (h V1RebuildStatsResponse) IsRebuildPartial() bool
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 ¶
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 ChecksumReplica ¶
ChecksumReplica calculate the checksum of a replica
func CreateReplica ¶
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 ¶
CreateReplicaExt create a replica on a mayastor node
func DestroyAllPools ¶
func DestroyPool ¶
func FindReplicas ¶
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 ListNvmeControllers ¶
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 ¶
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 ¶
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 ResetIOStats ¶
func RmNodeReplicas ¶
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 UnshareBdev ¶
UnshareBdev unshare a bdev with uuid
Types ¶
type V1MayastorNexus ¶
type V1MayastorNexus 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"` }
V1MayastorNexus Mayastor Nexus data
func FindNexus ¶
func FindNexus(uuid string, addrs []string) (*V1MayastorNexus, error)
FindNexus given a list of node ip addresses, return the common.MayastorNexus with matching uuid returns accumulated errors if gRPC communication failed.
func ListNexuses ¶
func ListNexuses(addrs []string) ([]V1MayastorNexus, 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 (V1MayastorNexus) GetChildren ¶
func (msn V1MayastorNexus) GetChildren() []v1MayastorNexusChild
func (V1MayastorNexus) GetSize ¶
func (msn V1MayastorNexus) GetSize() uint64
func (V1MayastorNexus) GetStateString ¶
func (msn V1MayastorNexus) GetStateString() string
func (V1MayastorNexus) GetString ¶
func (msn V1MayastorNexus) GetString() string
func (V1MayastorNexus) GetUuid ¶
func (msn V1MayastorNexus) GetUuid() string
type V1RebuildHistory ¶
type V1RebuildHistory struct { Uuid string `protobuf:"bytes,1,opt,name=nexus,proto3" json:"nexus,omitempty"` // uuid of the nexus Records []*mayastorGrpc.RebuildHistoryRecord `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` // List of all the rebuild records }
func GetRebuildHistory ¶
func GetRebuildHistory(uuid string, address string) (V1RebuildHistory, error)
GetRebuildHistory given a node ip address, return the V1RebuildHistory with matching uuid returns accumulated errors if gRPC communication failed.
func (V1RebuildHistory) GetRecord ¶
func (h V1RebuildHistory) GetRecord() []v1RebuildHistoryRecord
func (V1RebuildHistory) GetUuid ¶
func (h V1RebuildHistory) GetUuid() string
type V1RebuildStatsResponse ¶
type V1RebuildStatsResponse 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 already recovered BlocksTransferred uint64 `protobuf:"varint,8,opt,name=blocks_transferred,json=blocksTransferred,proto3" json:"blocks_transferred,omitempty"` // number of blocks for which the actual data transfer already occurred BlocksRemaining uint64 `protobuf:"varint,9,opt,name=blocks_remaining,json=blocksRemaining,proto3" json:"blocks_remaining,omitempty"` // number of blocks remaining to transfer Progress uint64 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"` // rebuild progress % BlocksPerTask uint64 `protobuf:"varint,4,opt,name=blocks_per_task,json=blocksPerTask,proto3" json:"blocks_per_task,omitempty"` // granularity of each recovery task in blocks BlockSize uint64 `protobuf:"varint,5,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` // size in bytes of logical 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 IsPartial bool `protobuf:"varint,10,opt,name=is_partial,json=isPartial,proto3" json:"is_partial,omitempty"` // true for partial (only modified blocked transferred); false for the full rebuild (all blocks transferred) StartTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // start time of the rebuild (UTC) }
func GetRebuildStats ¶
func GetRebuildStats(uuid string, dstUri string, address string) (V1RebuildStatsResponse, error)
GetRebuildStats given a node ip address, return the V1RebuildStatsResponse with matching nexus uuid and destination uri returns accumulated errors if gRPC communication failed.
func (V1RebuildStatsResponse) GetBlockSize ¶
func (h V1RebuildStatsResponse) GetBlockSize() uint64
func (V1RebuildStatsResponse) GetBlocksPerTask ¶
func (h V1RebuildStatsResponse) GetBlocksPerTask() uint64
func (V1RebuildStatsResponse) GetBlocksRecovered ¶
func (h V1RebuildStatsResponse) GetBlocksRecovered() uint64
func (V1RebuildStatsResponse) GetBlocksRemaining ¶
func (h V1RebuildStatsResponse) GetBlocksRemaining() uint64
func (V1RebuildStatsResponse) GetBlocksTotal ¶
func (h V1RebuildStatsResponse) GetBlocksTotal() uint64
func (V1RebuildStatsResponse) GetBlocksTransferred ¶
func (h V1RebuildStatsResponse) GetBlocksTransferred() uint64
func (V1RebuildStatsResponse) GetProgress ¶
func (h V1RebuildStatsResponse) GetProgress() uint64
func (V1RebuildStatsResponse) GetStartTime ¶
func (h V1RebuildStatsResponse) GetStartTime() *timestamppb.Timestamp
func (V1RebuildStatsResponse) GetTasksActive ¶
func (h V1RebuildStatsResponse) GetTasksActive() uint64
func (V1RebuildStatsResponse) GetTasksTotal ¶
func (h V1RebuildStatsResponse) GetTasksTotal() uint64
func (V1RebuildStatsResponse) IsRebuildPartial ¶
func (h V1RebuildStatsResponse) IsRebuildPartial() bool