server

package
v0.0.0-...-c7675eb Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-2-Clause-Patent Imports: 68 Imported by: 4

README

DAOS Server

The server package implements the internals of the DAOS Server, and the daos_server user-facing application is implemented by the daos_server package.

I/O Engine Instances

DAOS I/O Engine processes (daos_engine binary) are forked by the DAOS Control Server (daos_server binary) and perform the main userspace I/O operations of DAOS. instance.go provides the EngineInstance abstraction and relevant methods.

Underlying abstractions for the control and configuration of the I/O Engine processes are encapsulated in the engine package.

I/O Engine Harness

DAOS I/O Engine processes are managed and monitored by the DAOS Server and logically reside as members of the I/O Engine harness. harness.go provides the EngineHarness abstraction and relevant methods.

Communications

The DAOS Server implements the gRPC protocol to communicate with client gRPC applications and interacts with DAOS I/O Engines through Unix domain sockets.

Multiple gRPC server modules are loaded by DAOS Server, currently included modules are security and management.

DAOS Server (daos_server) instances will open a gRPC channel to listen for requests from control-plane client applications and other DAOS Server instances.

server.go contains main setup routines, including the establishment of the gRPC server and registering of RPCs.

Control API

The control package exposes an RPC-based API for control-plane client applications to communicate with DAOS Server processes.

Protobuf Definitions

Protobuf definitions are described in the proto directory.

Control Service

The gRPC server registers the control service to handle requests from the management tool.

Control service requests are operations that will be performed on one or more daos_server processes in parallel, such as hardware provisioning. The handlers triggered on receipt of control service RPCs will typically end-up calling into native-C storage or network libraries through the relevant go bindings e.g. ipmctl, spdk or hardware.

Such broadcast commands (which will be issued after connecting to a list of hosts) will usually be issued by the management tool, a gRPC client that communicates with daos_server processes through the control API.

These commands will not usually trigger dRPCs and will mostly perform functions such as hardware (network and storage) provisioning.

The control service RPC handler code is contained in /src/control/server/ctl_*.go files and protobuf specific un/wrapping code in /src/control/server/ctl_*_rpc.go files.

Management Service

The Control Plane implements a management service as part of the DAOS Server, responsible for handling distributed operations across the DAOS System.

Some dmg commands will trigger MS requests to be issued to a daos_server process on a storage node running as the MS leader, this happens under the hood and the logic for the request steering is handled in the control API which is utilized by the dmg tool.

When necessary, requests will be forwarded to the data plane engine over dRPC channel and handled by the mgmt module.

MS RPC related code is contained in /src/control/server/mgmt_*.go files.

Server-to-server Fan-out

Some control service RPC handlers will trigger fan-out to multiple remote harnesses over gRPC, in order to send these fan-out requests the client in the control API is used.

An example of a management tool command that executes gRPC fan-out over multiple remote harnesses is dmg system stop, the server side handler for which is SystemStop in ctl_system.go which issues requests to remote harnesses. The use of the control API client (which implements the UnaryInvoker interface) to issue a fan-out request is demonstrated in system.go SystemStop client call.

System Command Handling

System commands use fan-out and send unary RPCs to selected ranks across the system for actions stop, start and reformat.

Storage Command Handling

Storage related RPCs, whose handlers are defined in ctl_storage*.go delegate operations to backend providers encapsulated in the bdev and scm storage subsystem packages.

Bootstrapping and DAOS System Membership

When starting a data-plane instance, we look at the superblock to determine whether the instance should be started as a MS (management service) replica. The daos_server.yml's access_points parameter is used (only during format) to determine whether an instance is to be a MS replica or not.

When the starting instance is identified as an MS replica, it performs bootstrap and starts. If the DAOS system has only one replica (as specified by access_points parameter), the host of the bootstrapped instance is now the MS leader. Whereas if there are multiple replicas, elections will happen in the background and eventually a leader will be elected.

When the starting instance is not identified as an MS replica, the instance's host calls Join on the control API client which triggers a gRPC request to the MS leader. The joining instance's control address is populated in the request.

The gRPC server running on the MS leader handles the Join request and allocates a DAOS system rank which is recorded in the MS membership (which is backed by the distributed system database). The rank is returned in the Join response and communicated to the data-plane (engine) over dRPC.

Storage Management

Operations on NVMe SSD devices are performed using go-spdk bindings to issue commands through the SPDK framework native C libraries.

Operations on SCM persistent memory modules are performed using go-ipmctl bindings to issue commands through the ipmctl native C libraries.

Storage RPC related code which concerns the server-side handling of requests is contained within /src/control/server/ctl_storage*.go files.

Storage Format

Storage is required to be formatted before the DAOS data plane can be started.

Storage format diagram

If storage has not been previously formatted, daos_server will halt on start-up waiting for storage format to be triggered by issuing the dmg storage format command.

Storage format is expected only to be performed when setting up the DAOS system for the first time.

SCM Format

Formatting SCM involves creating an ext4 filesystem on the nvdimm device. Mounting SCM results in an active mount using the DAX extension enabling direct access without restrictions imposed by traditional block storage.

Formatting and mounting of SCM device namespace is performed as specified in config file parameters prefixed with scm_.

NVMe Format

In the context of what is required from the control plane to prepare NVMe devices for operation with DAOS data plane, "formatting" refers to the reset of storage media which will remove blobstores and remove any filesystem signatures from the SSD controller namespaces.

Formatting will be performed on devices identified by PCI addresses specified in config file parameter bdev_list when bdev_class is equal to nvme.

In order to designate NVMe devices to be used by DAOS data plane instances, the control plane will generate a daos_nvme.conf file to be consumed by SPDK which will be written to the scm_mount (persistent) mounted location as a final stage of formatting before the superblock is written, signifying the server has been formatted.

Architecture

A view of DAOS' software component architecture:

Architecture diagram

Running

For instructions on building and running DAOS see the admin guide.

Configuration

For instructions on configuring the DAOS server see the admin guide.

Documentation

Index

Constants

View Source
const (
	// DefaultPoolScmRatio defines the default SCM:NVMe ratio for
	// requests that do not specify one.
	DefaultPoolScmRatio = 0.06
	// DefaultPoolNvmeRatio defines the default NVMe:SCM ratio for
	// requests that do not specify one.
	DefaultPoolNvmeRatio = 0.94
	// MaxPoolServiceReps defines the maximum number of pool service
	// replicas that may be configured when creating a pool.
	MaxPoolServiceReps = 2*daos.PoolSvcRedunFacMax + 1
)

Variables

View Source
var (
	FaultUnknown = serverFault(
		code.ServerUnknown,
		"unknown control server error",
		"",
	)
	FaultIommuDisabled = serverFault(
		code.ServerIommuDisabled,
		"no IOMMU detected while running as non-root user with NVMe devices",
		"enable IOMMU per the DAOS Admin Guide or run daos_server as root",
	)
	FaultVfioDisabled = serverFault(
		code.ServerVfioDisabled,
		"disable_vfio: true in config while running as non-root user with NVMe devices",
		"set disable_vfio: false or run daos_server as root",
	)
	FaultHarnessNotStarted = serverFault(
		code.ServerHarnessNotStarted,
		fmt.Sprintf("%s harness not started", build.DataPlaneName),
		"retry the operation or check server logs for more details",
	)
	FaultDataPlaneNotStarted = serverFault(
		code.ServerDataPlaneNotStarted,
		fmt.Sprintf("%s instance not started or not responding on dRPC", build.DataPlaneName),
		"retry the operation or check server logs for more details",
	)
	FaultPoolNoLabel = serverFault(
		code.ServerPoolNoLabel,
		"cannot create a pool without a pool label",
		"retry the operation with a label set",
	)
	FaultPoolHasContainers = serverFault(
		code.ServerPoolHasContainers,
		"cannot destroy a pool with existing containers",
		"retry the operation with the recursive flag set to remove containers along with the pool",
	)
	FaultHugepagesDisabled = serverFault(
		code.ServerHugepagesDisabled,
		"the use of hugepages has been disabled in the server config",
		"set false (or remove) disable_hugepages parameter in config and reformat storage, then retry the operation",
	)
)

Functions

func CreateDatabaseConfig

func CreateDatabaseConfig(cfg *config.Server) (*raft.DatabaseConfig, error)

CreateDatabaseConfig creates a new database configuration.

func FaultEngineNUMAImbalance

func FaultEngineNUMAImbalance(nodeMap map[int]int) *fault.Fault

func FaultIncompatibleComponents

func FaultIncompatibleComponents(self, other *build.VersionedComponent) *fault.Fault

func FaultInstancesNotStopped

func FaultInstancesNotStopped(action string, rank ranklist.Rank) *fault.Fault

func FaultNoCompatibilityInsecure

func FaultNoCompatibilityInsecure(self, other build.Version) *fault.Fault

func FaultPoolDuplicateLabel

func FaultPoolDuplicateLabel(dupe string) *fault.Fault

func FaultPoolInvalidNumRanks

func FaultPoolInvalidNumRanks(req, avail int) *fault.Fault

func FaultPoolInvalidRanks

func FaultPoolInvalidRanks(invalid []ranklist.Rank) *fault.Fault

func FaultPoolInvalidServiceReps

func FaultPoolInvalidServiceReps(maxSvcReps uint32) *fault.Fault

func FaultPoolNvmeTooSmall

func FaultPoolNvmeTooSmall(minTotal, minNVMe uint64) *fault.Fault

func FaultPoolScmTooSmall

func FaultPoolScmTooSmall(minTotal, minSCM uint64) *fault.Fault

func FaultScmUnmanaged

func FaultScmUnmanaged(mntPoint string) *fault.Fault

func FaultWrongSystem

func FaultWrongSystem(reqName, sysName string) *fault.Fault

func MockMemInfo

func MockMemInfo() *common.MemInfo

MockMemInfo returns a mock MemInfo result.

func Start

func Start(log logging.Logger, cfg *config.Server) error

Start is the entry point for a daos_server instance.

func WriteSuperblock

func WriteSuperblock(sbPath string, sb *Superblock) error

WriteSuperblock writes a Superblock to storage.

Types

type ControlService

type ControlService struct {
	ctlpb.UnimplementedCtlSvcServer
	StorageControlService
	// contains filtered or unexported fields
}

ControlService implements the control plane control service, satisfying ctlpb.CtlSvcServer, and is the data container for the service.

func NewControlService

func NewControlService(log logging.Logger, h *EngineHarness,
	cfg *config.Server, e *events.PubSub, f *hardware.FabricScanner) *ControlService

NewControlService returns ControlService to be used as gRPC control service datastore. Initialized with sensible defaults and provided components.

func (*ControlService) CollectLog

CollectLog collect the file for each server on given target location.

func (*ControlService) FabricScan

func (cs *ControlService) FabricScan(ctx context.Context, providers ...string) (*hardware.FabricInterfaceSet, error)

FabricScan performs a scan of fabric interfaces given a list of providers.

func (*ControlService) FirmwareQuery

func (svc *ControlService) FirmwareQuery(parent context.Context, pbReq *ctlpb.FirmwareQueryReq) (*ctlpb.FirmwareQueryResp, error)

FirmwareQuery implements the method defined for the control service if firmware management is enabled for this build.

It fetches information about the device firmware on this server based on the caller's request parameters. It can fetch firmware information for NVMe, SCM, or both.

func (*ControlService) FirmwareUpdate

func (svc *ControlService) FirmwareUpdate(parent context.Context, pbReq *ctlpb.FirmwareUpdateReq) (*ctlpb.FirmwareUpdateResp, error)

FirmwareUpdate implements the method defined for the control service if firmware management is enabled for this build.

It updates the firmware on the storage devices of the specified type.

func (*ControlService) NetworkScan

NetworkScan retrieves details of network interfaces on remote hosts.

func (*ControlService) PrepShutdownRanks

func (svc *ControlService) PrepShutdownRanks(ctx context.Context, req *ctlpb.RanksReq) (*ctlpb.RanksResp, error)

PrepShutdownRanks implements the method defined for the Management Service.

Prepare data-plane instance(s) managed by control-plane for a controlled shutdown, identified by unique rank(s).

Iterate over local instances, issue PrepShutdown dRPCs and record results.

func (*ControlService) ResetFormatRanks

func (svc *ControlService) ResetFormatRanks(ctx context.Context, req *ctlpb.RanksReq) (*ctlpb.RanksResp, error)

ResetFormatRanks implements the method defined for the Management Service.

Reset storage format of data-plane instances (DAOS system members) managed by harness.

Reset formatted state of data-plane instance(s) managed by control-plane identified by unique rank(s). After attempting to reset instances through harness (when either all instances are awaiting format or timeout has occurred), populate response results based on local instance state.

func (*ControlService) SetEngineLogMasks

func (svc *ControlService) SetEngineLogMasks(ctx context.Context, req *ctlpb.SetLogMasksReq) (*ctlpb.SetLogMasksResp, error)

SetEngineLogMasks calls into each engine over dRPC to set loglevel at runtime.

func (*ControlService) SmdManage

func (svc *ControlService) SmdManage(ctx context.Context, req *ctlpb.SmdManageReq) (*ctlpb.SmdManageResp, error)

SmdManage implements the method defined for the Management Service.

Manage SMD devices.

func (*ControlService) SmdQuery

func (svc *ControlService) SmdQuery(ctx context.Context, req *ctlpb.SmdQueryReq) (*ctlpb.SmdQueryResp, error)

SmdQuery implements the method defined for the Management Service.

Query SMD info for pools or devices.

func (*ControlService) StartRanks

func (svc *ControlService) StartRanks(ctx context.Context, req *ctlpb.RanksReq) (*ctlpb.RanksResp, error)

StartRanks implements the method defined for the Management Service.

Start data-plane instance(s) managed by control-plane identified by unique rank(s). After attempting to start instances through harness (when either all instances are in ready state or timeout has occurred), populate response results based on local instance state.

func (*ControlService) StopRanks

func (svc *ControlService) StopRanks(ctx context.Context, req *ctlpb.RanksReq) (*ctlpb.RanksResp, error)

StopRanks implements the method defined for the Management Service.

Stop data-plane instance(s) managed by control-plane identified by unique rank(s). After attempting to stop instances through harness (when either all instances are stopped or timeout has occurred), populate response results based on local instance state.

func (*ControlService) StorageFormat

StorageFormat delegates to Storage implementation's Format methods to prepare storage for use by DAOS data plane.

Errors returned will stop other servers from formatting, non-fatal errors specific to particular device should be reported within resp results instead.

Send response containing multiple results of format operations on scm mounts and nvme controllers.

func (*ControlService) StorageNvmeAddDevice

func (cs *ControlService) StorageNvmeAddDevice(ctx context.Context, req *ctlpb.NvmeAddDeviceReq) (resp *ctlpb.NvmeAddDeviceResp, err error)

StorageNvmeAddDevice adds a newly added SSD to a DAOS engine's NVMe config to allow it to be used.

If StorageTierIndex is set to -1 in request, add the device to the first configured bdev tier.

func (*ControlService) StorageNvmeRebind

func (cs *ControlService) StorageNvmeRebind(ctx context.Context, req *ctlpb.NvmeRebindReq) (*ctlpb.NvmeRebindResp, error)

StorageNvmeRebind rebinds SSD from kernel and binds to user-space to allow DAOS to use it.

func (*ControlService) StorageScan

StorageScan discovers non-volatile storage hardware on node.

type Engine

type Engine interface {

	// These methods should probably be replaced by callbacks.
	NotifyDrpcReady(*srvpb.NotifyReadyReq)
	NotifyStorageReady()

	// These methods should probably be refactored out into functions that
	// accept the engine instance as a parameter.
	StorageFormatSCM(context.Context, bool) *ctlpb.ScmMountResult

	// This is a more reasonable surface that will be easier to maintain and test.
	CallDrpc(context.Context, drpc.Method, proto.Message) (*drpc.Response, error)
	GetRank() (ranklist.Rank, error)
	GetTargetCount() int
	Index() uint32
	IsStarted() bool
	IsReady() bool
	LocalState() system.MemberState
	RemoveSuperblock() error
	Run(context.Context)
	SetupRank(context.Context, ranklist.Rank, uint32) error
	Stop(os.Signal) error
	OnInstanceExit(...onInstanceExitFn)
	OnReady(...onReadyFn)
	GetStorage() *storage.Provider
	SetCheckerMode(bool)
	Debugf(format string, args ...interface{})
	Tracef(format string, args ...interface{})
	// contains filtered or unexported methods
}

Engine defines an interface to be implemented by engine instances.

NB: This interface is way too big right now; need to refactor in order to limit scope.

type EngineHarness

type EngineHarness struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

EngineHarness is responsible for managing Engine instances.

func NewEngineHarness

func NewEngineHarness(log logging.Logger) *EngineHarness

NewEngineHarness returns an initialized *EngineHarness.

func (*EngineHarness) AddInstance

func (h *EngineHarness) AddInstance(ei Engine) error

AddInstance adds a new Engine instance to be managed.

func (*EngineHarness) CallDrpc

func (h *EngineHarness) CallDrpc(ctx context.Context, method drpc.Method, body proto.Message) (resp *drpc.Response, err error)

CallDrpc calls the supplied dRPC method on a managed I/O Engine instance.

func (*EngineHarness) FilterInstancesByRankSet

func (h *EngineHarness) FilterInstancesByRankSet(ranks string) ([]Engine, error)

FilterInstancesByRankSet returns harness' EngineInstances that match any of a list of ranks derived from provided rank set string.

func (*EngineHarness) Instances

func (h *EngineHarness) Instances() []Engine

Instances safely returns harness' EngineInstances.

func (*EngineHarness) OnDrpcFailure

func (h *EngineHarness) OnDrpcFailure(fns ...onDrpcFailureFn)

OnDrpcFailure registers callbacks to be invoked on dRPC call failure.

func (*EngineHarness) Start

func (h *EngineHarness) Start(ctx context.Context, db dbLeader, cfg *config.Server) error

Start starts harness by setting up and starting dRPC before initiating configured instances' processing loops.

Run until harness is shutdown.

func (*EngineHarness) WithFaultDomain

func (h *EngineHarness) WithFaultDomain(fd *system.FaultDomain) *EngineHarness

WithFaultDomain adds a fault domain to the EngineHarness.

type EngineInstance

type EngineInstance struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

EngineInstance encapsulates control-plane specific configuration and functionality for managed I/O Engine instances. The distinction between this structure and what's in the engine package is that the engine package is only concerned with configuring and executing a single daos_engine instance. EngineInstance is intended to be used with EngineHarness to manage and monitor multiple instances per node.

func NewEngineInstance

func NewEngineInstance(l logging.Logger, p *storage.Provider, jf systemJoinFn, r EngineRunner) *EngineInstance

NewEngineInstance returns an *EngineInstance initialized with its dependencies.

func (*EngineInstance) CallDrpc

func (ei *EngineInstance) CallDrpc(ctx context.Context, method drpc.Method, body proto.Message) (*drpc.Response, error)

CallDrpc makes the supplied dRPC call via this instance's dRPC client.

func (*EngineInstance) Debugf

func (ei *EngineInstance) Debugf(format string, args ...interface{})

func (*EngineInstance) GetRank

func (ei *EngineInstance) GetRank() (ranklist.Rank, error)

GetRank returns a valid instance rank or error.

func (*EngineInstance) GetStorage

func (ei *EngineInstance) GetStorage() *storage.Provider

GetStorage retrieve the storage provider for an engine instance.

func (*EngineInstance) GetTargetCount

func (ei *EngineInstance) GetTargetCount() int

GetTargetCount returns the target count set for this instance.

func (*EngineInstance) Index

func (ei *EngineInstance) Index() uint32

Index returns the server index assigned by the harness.

func (*EngineInstance) IsReady

func (ei *EngineInstance) IsReady() bool

IsReady indicates whether the EngineInstance is in a ready state.

If true indicates that the instance is fully setup, distinct from drpc and storage ready states, and currently active.

func (*EngineInstance) IsStarted

func (ei *EngineInstance) IsStarted() bool

IsStarted indicates whether EngineInstance is in a running state.

func (*EngineInstance) LocalState

func (ei *EngineInstance) LocalState() system.MemberState

LocalState returns local perspective of the current instance state (doesn't consider state info held by the global system membership).

func (*EngineInstance) MountMetadata

func (ei *EngineInstance) MountMetadata() error

MountMetadata mounts the configured control metadata location.

func (*EngineInstance) MountScm

func (ei *EngineInstance) MountScm() error

MountScm mounts the configured SCM device (DCPM or ramdisk emulation) at the mountpoint specified in the configuration. If the device is already mounted, the function returns nil, indicating success.

func (*EngineInstance) NotifyDrpcReady

func (ei *EngineInstance) NotifyDrpcReady(msg *srvpb.NotifyReadyReq)

NotifyDrpcReady receives a ready message from the running Engine instance.

func (*EngineInstance) NotifyStorageReady

func (ei *EngineInstance) NotifyStorageReady()

NotifyStorageReady releases any blocks on awaitStorageReady().

func (*EngineInstance) OnAwaitFormat

func (ei *EngineInstance) OnAwaitFormat(fns ...onAwaitFormatFn)

OnAwaitFormat adds a list of callbacks to invoke when the instance requires formatting.

func (*EngineInstance) OnInstanceExit

func (ei *EngineInstance) OnInstanceExit(fns ...onInstanceExitFn)

OnInstanceExit adds a list of callbacks to invoke when the instance runner (process) terminates.

func (*EngineInstance) OnReady

func (ei *EngineInstance) OnReady(fns ...onReadyFn)

OnReady adds a list of callbacks to invoke when the instance becomes ready.

func (*EngineInstance) OnStorageReady

func (ei *EngineInstance) OnStorageReady(fns ...onStorageReadyFn)

OnStorageReady adds a list of callbacks to invoke when the instance storage becomes ready.

func (*EngineInstance) ReadSuperblock

func (ei *EngineInstance) ReadSuperblock() error

ReadSuperblock reads the instance's superblock from storage.

func (*EngineInstance) RemoveSuperblock

func (ei *EngineInstance) RemoveSuperblock() error

RemoveSuperblock removes a superblock from storage.

func (*EngineInstance) Run

func (ei *EngineInstance) Run(ctx context.Context)

Run starts the control loop for an EngineInstance. Engine starts are triggered by calling requestStart() on the instance.

func (*EngineInstance) SetCheckerMode

func (ei *EngineInstance) SetCheckerMode(enabled bool)

SetCheckerMode adjusts the engine configuration to enable or disable starting the engine in checker mode.

func (*EngineInstance) SetupRank

func (ei *EngineInstance) SetupRank(ctx context.Context, rank ranklist.Rank, map_version uint32) error

func (*EngineInstance) Stop

func (ei *EngineInstance) Stop(signal os.Signal) error

Stop sends signal to stop EngineInstance runner (nonblocking).

func (*EngineInstance) StorageFormatSCM

func (ei *EngineInstance) StorageFormatSCM(ctx context.Context, force bool) (mResult *ctlpb.ScmMountResult)

StorageFormatSCM performs format on SCM and identifies if superblock needs writing.

func (*EngineInstance) Tracef

func (ei *EngineInstance) Tracef(format string, args ...interface{})

func (*EngineInstance) WithHostFaultDomain

func (ei *EngineInstance) WithHostFaultDomain(fd *system.FaultDomain) *EngineInstance

WithHostFaultDomain adds a fault domain for the host this instance is running on.

func (*EngineInstance) WriteSuperblock

func (ei *EngineInstance) WriteSuperblock() error

WriteSuperblock writes the instance's superblock to storage.

type EngineRunner

type EngineRunner interface {
	Start(context.Context) (engine.RunnerExitChan, error)
	IsRunning() bool
	Signal(os.Signal)
	GetConfig() *engine.Config
}

EngineRunner defines an interface for starting and stopping the daos_engine.

type SecurityModule

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

SecurityModule is the security drpc module struct

func NewSecurityModule

func NewSecurityModule(log logging.Logger, tc *security.TransportConfig) *SecurityModule

NewSecurityModule creates a new security module with a transport config

func (*SecurityModule) HandleCall

func (m *SecurityModule) HandleCall(_ context.Context, session *drpc.Session, method drpc.Method, body []byte) ([]byte, error)

HandleCall is the handler for calls to the SecurityModule

func (*SecurityModule) ID

func (m *SecurityModule) ID() drpc.ModuleID

ID will return Security module ID

type StorageControlService

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

StorageControlService encapsulates the storage part of the control service

func NewMockStorageControlService

func NewMockStorageControlService(log logging.Logger, ecs []*engine.Config, sys storage.SystemProvider, scm storage.ScmProvider, bdev storage.BdevProvider, getMemInfo common.GetMemInfoFn) *StorageControlService

NewMockStorageControlService returns a StorageControlService with a mocked storage provider consisting of the given sys, scm and bdev providers.

func NewStorageControlService

func NewStorageControlService(log logging.Logger, ecs []*engine.Config) *StorageControlService

NewStorageControlService returns an initialized *StorageControlService

func (*StorageControlService) NvmePrepare

NvmePrepare preps locally attached SSDs.

func (*StorageControlService) NvmeScan

NvmeScan scans locally attached SSDs.

func (*StorageControlService) ScmPrepare

ScmPrepare preps locally attached modules.

func (*StorageControlService) ScmScan

ScmScan scans locally attached modules and namespaces.

func (*StorageControlService) WithVMDEnabled

func (scs *StorageControlService) WithVMDEnabled() *StorageControlService

WithVMDEnabled enables VMD support in storage provider.

type Superblock

type Superblock struct {
	Version         uint8
	UUID            string
	System          string
	Rank            *ranklist.Rank
	URI             string
	ValidRank       bool
	HostFaultDomain string
}

Superblock is the per-Instance superblock

func ReadSuperblock

func ReadSuperblock(sbPath string) (*Superblock, error)

ReadSuperblock reads a Superblock from storage.

func (*Superblock) Marshal

func (sb *Superblock) Marshal() ([]byte, error)

Marshal transforms the Superblock into a storable representation

func (*Superblock) Unmarshal

func (sb *Superblock) Unmarshal(raw []byte) error

Unmarshal reconstitutes a Superblock from a Marshaled representation

Directories

Path Synopsis
scm

Jump to

Keyboard shortcuts

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