Documentation ¶
Overview ¶
(C) Copyright 2019 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
(C) Copyright 2019 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
Index ¶
- Constants
- func CheckReplica(lis net.Listener, accessPoints []string, srv *exec.Cmd) (msReplicaCheck string, err error)
- func Start(log *logging.LeveledLogger, cfg *Configuration) error
- func WriteSuperblock(sbPath string, sb *Superblock) error
- type Configuration
- func (c *Configuration) Load() error
- func (c *Configuration) SaveToFile(filename string) error
- func (c *Configuration) SetNvmeShmID(base string)
- func (c *Configuration) SetPath(path string) error
- func (c *Configuration) Validate() (err error)
- func (c *Configuration) WithAccessPoints(aps ...string) *Configuration
- func (c *Configuration) WithBdevExclude(bList ...string) *Configuration
- func (c *Configuration) WithBdevInclude(bList ...string) *Configuration
- func (c *Configuration) WithControlLogFile(filePath string) *Configuration
- func (c *Configuration) WithControlLogJSON(enabled bool) *Configuration
- func (c *Configuration) WithControlLogMask(lvl ControlLogLevel) *Configuration
- func (c *Configuration) WithControlPort(port int) *Configuration
- func (c *Configuration) WithFabricProvider(provider string) *Configuration
- func (c *Configuration) WithFaultCb(cb string) *Configuration
- func (c *Configuration) WithFaultPath(fp string) *Configuration
- func (c *Configuration) WithGroupName(name string) *Configuration
- func (c *Configuration) WithHelperLogFile(filePath string) *Configuration
- func (c *Configuration) WithHyperthreads(enabled bool) *Configuration
- func (c *Configuration) WithModules(mList string) *Configuration
- func (c *Configuration) WithNUMAValidator(fn networkNUMAValidation) *Configuration
- func (c *Configuration) WithNrHugePages(nr int) *Configuration
- func (c *Configuration) WithNvmeShmID(id int) *Configuration
- func (c *Configuration) WithProviderValidator(fn networkProviderValidation) *Configuration
- func (c *Configuration) WithRecreateSuperblocks() *Configuration
- func (c *Configuration) WithScmMountPoint(mp string) *Configurationdeprecated
- func (c *Configuration) WithServers(srvList ...*ioserver.Config) *Configuration
- func (c *Configuration) WithSocketDir(sockDir string) *Configuration
- func (c *Configuration) WithSystemName(name string) *Configuration
- func (c *Configuration) WithTransportConfig(cfg *security.TransportConfig) *Configuration
- func (c *Configuration) WithUserName(name string) *Configuration
- type ControlLogLevel
- type ControlService
- func (c *ControlService) NetworkListProviders(ctx context.Context, in *pb.ProviderListRequest) (*pb.ProviderListReply, error)
- func (c *ControlService) NetworkScanDevices(in *pb.DeviceScanRequest, stream pb.MgmtCtl_NetworkScanDevicesServer) error
- func (c *ControlService) StorageFormat(req *ctlpb.StorageFormatReq, stream ctlpb.MgmtCtl_StorageFormatServer) error
- func (svc *ControlService) SystemMemberQuery(ctx context.Context, req *ctlpb.SystemMemberQueryReq) (*ctlpb.SystemMemberQueryResp, error)
- func (svc *ControlService) SystemStop(ctx context.Context, req *ctlpb.SystemStopReq) (*ctlpb.SystemStopResp, error)
- type External
- type IOServerHarness
- func (h *IOServerHarness) AddInstance(srv *IOServerInstance) error
- func (h *IOServerHarness) AwaitStorageReady(ctx context.Context, skipMissingSuperblock bool) error
- func (h *IOServerHarness) CreateSuperblocks(recreate bool) error
- func (h *IOServerHarness) GetMSLeaderInstance() (*IOServerInstance, error)
- func (h *IOServerHarness) Instances() []*IOServerInstance
- func (h *IOServerHarness) IsStarted() bool
- func (h *IOServerHarness) Start(parent context.Context) error
- func (h *IOServerHarness) StartManagementService(ctx context.Context) error
- type IOServerInstance
- func (srv *IOServerInstance) AwaitReady() chan *srvpb.NotifyReadyReq
- func (srv *IOServerInstance) AwaitStorageReady(ctx context.Context)
- func (srv *IOServerInstance) BioErrorNotify(bio *srvpb.BioErrorReq)
- func (srv *IOServerInstance) CallDrpc(module, method int32, body proto.Message) (*drpc.Response, error)
- func (srv *IOServerInstance) CreateSuperblock(msInfo *mgmtInfo) error
- func (srv *IOServerInstance) Index() uint32
- func (srv *IOServerInstance) IsMSReplica() bool
- func (srv *IOServerInstance) LoadModules() error
- func (srv *IOServerInstance) MountScmDevice() error
- func (srv *IOServerInstance) NeedsScmFormat() (bool, error)
- func (srv *IOServerInstance) NeedsSuperblock() (bool, error)
- func (srv *IOServerInstance) NotifyReady(msg *srvpb.NotifyReadyReq)
- func (srv *IOServerInstance) NotifyStorageReady()
- func (srv *IOServerInstance) ReadSuperblock() error
- func (srv *IOServerInstance) SetIndex(idx uint32)
- func (srv *IOServerInstance) SetRank(ctx context.Context, ready *srvpb.NotifyReadyReq) error
- func (srv *IOServerInstance) Start(ctx context.Context, errChan chan<- error) error
- func (srv *IOServerInstance) StartManagementService() error
- func (srv *IOServerInstance) WriteSuperblock() error
- type IOServerStarter
- type SecurityModule
- type StorageControlService
- func (c *StorageControlService) GetScmState() (storage.ScmState, error)
- func (c *StorageControlService) NvmePrepare(req bdev.PrepareRequest) (*bdev.PrepareResponse, error)
- func (c *StorageControlService) NvmeScan() (*bdev.ScanResponse, error)
- func (c *StorageControlService) ScmPrepare(req scm.PrepareRequest) (*scm.PrepareResponse, error)
- func (c *StorageControlService) ScmScan() (*scm.ScanResponse, error)
- func (c *StorageControlService) Setup() error
- func (c *StorageControlService) StoragePrepare(ctx context.Context, req *ctlpb.StoragePrepareReq) (*ctlpb.StoragePrepareResp, error)
- func (c *StorageControlService) StorageScan(ctx context.Context, req *ctlpb.StorageScanReq) (*ctlpb.StorageScanResp, error)
- type Superblock
Constants ¶
const ( ControlLogLevelDebug = ControlLogLevel(logging.LogLevelDebug) ControlLogLevelInfo = ControlLogLevel(logging.LogLevelInfo) ControlLogLevelError = ControlLogLevel(logging.LogLevelError) )
TODO(mjmac): Evaluate whether or not this layer of indirection adds any value.
Variables ¶
This section is empty.
Functions ¶
func CheckReplica ¶
func CheckReplica(lis net.Listener, accessPoints []string, srv *exec.Cmd) (msReplicaCheck string, err error)
CheckReplica verifies if this server is supposed to host an MS replica, only performing the check and printing the result for now.
func Start ¶
func Start(log *logging.LeveledLogger, cfg *Configuration) 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 Configuration ¶
type Configuration struct { // control-specific ControlPort int `yaml:"port"` TransportConfig *security.TransportConfig `yaml:"transport_config"` Servers []*ioserver.Config `yaml:"servers"` BdevInclude []string `yaml:"bdev_include,omitempty"` BdevExclude []string `yaml:"bdev_exclude,omitempty"` NrHugepages int `yaml:"nr_hugepages"` ControlLogMask ControlLogLevel `yaml:"control_log_mask"` ControlLogFile string `yaml:"control_log_file"` ControlLogJSON bool `yaml:"control_log_json,omitempty"` HelperLogFile string `yaml:"helper_log_file"` UserName string `yaml:"user_name"` GroupName string `yaml:"group_name"` RecreateSuperblocks bool `yaml:"recreate_superblocks"` // duplicated in ioserver.Config SystemName string `yaml:"name"` SocketDir string `yaml:"socket_dir"` Fabric ioserver.FabricConfig `yaml:",inline"` Modules string AccessPoints []string `yaml:"access_points"` // unused (?) FaultPath string `yaml:"fault_path"` FaultCb string `yaml:"fault_cb"` Hyperthreads bool `yaml:"hyperthreads"` Path string // path to config file // Shared memory segment ID to enable SPDK multiprocess mode, // SPDK application processes can then access the same shared // memory and therefore NVMe controllers. // TODO: Is it also necessary to provide distinct coremask args? NvmeShmID int // contains filtered or unexported fields }
Configuration describes options for DAOS control plane. See utils/config/daos_server.yml for parameter descriptions.
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration creates a new instance of configuration struct populated with defaults and default external interface.
func (*Configuration) Load ¶
func (c *Configuration) Load() error
Load reads the serialized configuration from disk and validates it.
func (*Configuration) SaveToFile ¶
func (c *Configuration) SaveToFile(filename string) error
SaveToFile serializes the configuration and saves it to the specified filename.
func (*Configuration) SetNvmeShmID ¶
func (c *Configuration) SetNvmeShmID(base string)
func (*Configuration) SetPath ¶
func (c *Configuration) SetPath(path string) error
SetPath sets the default path to the configuration file.
func (*Configuration) Validate ¶
func (c *Configuration) Validate() (err error)
Validate asserts that config meets minimum requirements.
func (*Configuration) WithAccessPoints ¶
func (c *Configuration) WithAccessPoints(aps ...string) *Configuration
WithAccessPoints sets the access point list.
func (*Configuration) WithBdevExclude ¶
func (c *Configuration) WithBdevExclude(bList ...string) *Configuration
WithBdevExclude sets the block device exclude list.
func (*Configuration) WithBdevInclude ¶
func (c *Configuration) WithBdevInclude(bList ...string) *Configuration
WithBdevInclude sets the block device include list.
func (*Configuration) WithControlLogFile ¶
func (c *Configuration) WithControlLogFile(filePath string) *Configuration
WithControlLogFile sets the path to the daos_server logfile.
func (*Configuration) WithControlLogJSON ¶
func (c *Configuration) WithControlLogJSON(enabled bool) *Configuration
WithControlLogJSON enables or disables JSON output.
func (*Configuration) WithControlLogMask ¶
func (c *Configuration) WithControlLogMask(lvl ControlLogLevel) *Configuration
WithControlLogMask sets the daos_server log level.
func (*Configuration) WithControlPort ¶
func (c *Configuration) WithControlPort(port int) *Configuration
WithControlPort sets the gRPC listener port.
func (*Configuration) WithFabricProvider ¶
func (c *Configuration) WithFabricProvider(provider string) *Configuration
WithFabricProvider sets the top-level fabric provider.
func (*Configuration) WithFaultCb ¶
func (c *Configuration) WithFaultCb(cb string) *Configuration
WithFaultCb sets the path to the fault callback script.
func (*Configuration) WithFaultPath ¶
func (c *Configuration) WithFaultPath(fp string) *Configuration
WithFaultPath sets the fault path (identification string e.g. rack/shelf/node).
func (*Configuration) WithGroupName ¶
func (c *Configuration) WithGroupName(name string) *Configuration
WithGroupName sets the group to run as.
func (*Configuration) WithHelperLogFile ¶
func (c *Configuration) WithHelperLogFile(filePath string) *Configuration
WithHelperLogFile sets the path to the daos_admin logfile.
func (*Configuration) WithHyperthreads ¶
func (c *Configuration) WithHyperthreads(enabled bool) *Configuration
WithHyperthreads enables or disables hyperthread support.
func (*Configuration) WithModules ¶
func (c *Configuration) WithModules(mList string) *Configuration
WithModules sets a list of server modules to load.
func (*Configuration) WithNUMAValidator ¶
func (c *Configuration) WithNUMAValidator(fn networkNUMAValidation) *Configuration
WithNUMAValidator is used for unit testing configurations that are not necessarily valid on the test machine. We use the stub function ValidateNetworkConfigStub to avoid unnecessary failures in those tests that are not concerned with testing a truly valid configuration for the test system.
func (*Configuration) WithNrHugePages ¶
func (c *Configuration) WithNrHugePages(nr int) *Configuration
WithNrHugePages sets the number of huge pages to be used.
func (*Configuration) WithNvmeShmID ¶
func (c *Configuration) WithNvmeShmID(id int) *Configuration
WithNvmeShmID sets the common shmID used for SPDK multiprocess mode.
func (*Configuration) WithProviderValidator ¶
func (c *Configuration) WithProviderValidator(fn networkProviderValidation) *Configuration
WithProviderValidator is used for unit testing configurations that are not necessarily valid on the test machine. We use the stub function ValidateNetworkConfigStub to avoid unnecessary failures in those tests that are not concerned with testing a truly valid configuration for the test system.
func (*Configuration) WithRecreateSuperblocks ¶
func (c *Configuration) WithRecreateSuperblocks() *Configuration
WithRecreateSuperblocks indicates that a missing superblock should not be treated as an error. The server will create new superblocks as necessary.
func (*Configuration) WithScmMountPoint
deprecated
func (c *Configuration) WithScmMountPoint(mp string) *Configuration
WithScmMountPoint sets the SCM mountpoint for the first I/O Server.
Deprecated: This function exists to ease transition away from specifying the SCM mountpoint via daos_server CLI flag. Future versions will require the mountpoint to be set via configuration.
func (*Configuration) WithServers ¶
func (c *Configuration) WithServers(srvList ...*ioserver.Config) *Configuration
WithServers sets the list of IOServer configurations.
func (*Configuration) WithSocketDir ¶
func (c *Configuration) WithSocketDir(sockDir string) *Configuration
WithSocketDir sets the default socket directory.
func (*Configuration) WithSystemName ¶
func (c *Configuration) WithSystemName(name string) *Configuration
WithSystemName sets the system name.
func (*Configuration) WithTransportConfig ¶
func (c *Configuration) WithTransportConfig(cfg *security.TransportConfig) *Configuration
WithTransportConfig sets the gRPC transport configuration.
func (*Configuration) WithUserName ¶
func (c *Configuration) WithUserName(name string) *Configuration
WithUserName sets the user to run as.
type ControlLogLevel ¶
ControlLogLevel is a type that specifies log levels
func (ControlLogLevel) MarshalYAML ¶
func (c ControlLogLevel) MarshalYAML() (interface{}, error)
func (ControlLogLevel) String ¶
func (c ControlLogLevel) String() string
func (*ControlLogLevel) UnmarshalYAML ¶
func (c *ControlLogLevel) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler on ControlLogMask struct
type ControlService ¶
type ControlService struct { StorageControlService // contains filtered or unexported fields }
ctlpb.MgmtCtlServer, and is the data container for the service.
func NewControlService ¶
func NewControlService(l logging.Logger, h *IOServerHarness, bp *bdev.Provider, sp *scm.Provider, cfg *Configuration, m *common.Membership) (*ControlService, error)
NewControlService returns ControlService to be used as gRPC control service datastore. Initialised with sensible defaults and provided components.
func (*ControlService) NetworkListProviders ¶
func (c *ControlService) NetworkListProviders(ctx context.Context, in *pb.ProviderListRequest) (*pb.ProviderListReply, error)
func (*ControlService) NetworkScanDevices ¶
func (c *ControlService) NetworkScanDevices(in *pb.DeviceScanRequest, stream pb.MgmtCtl_NetworkScanDevicesServer) error
func (*ControlService) StorageFormat ¶
func (c *ControlService) StorageFormat(req *ctlpb.StorageFormatReq, stream ctlpb.MgmtCtl_StorageFormatServer) error
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) SystemMemberQuery ¶
func (svc *ControlService) SystemMemberQuery(ctx context.Context, req *ctlpb.SystemMemberQueryReq) (*ctlpb.SystemMemberQueryResp, error)
SystemMemberQuery implements the method defined for the Management Service.
Return system membership list including member state.
func (*ControlService) SystemStop ¶
func (svc *ControlService) SystemStop(ctx context.Context, req *ctlpb.SystemStopReq) (*ctlpb.SystemStopResp, error)
SystemStop implements the method defined for the Management Service.
Initiate controlled shutdown of DAOS system.
type External ¶
type External interface {
// contains filtered or unexported methods
}
External interface provides methods to support various os operations.
type IOServerHarness ¶
IOServerHarness is responsible for managing IOServer instances
func NewIOServerHarness ¶
func NewIOServerHarness(log logging.Logger) *IOServerHarness
NewHarness returns an initialized *IOServerHarness
func (*IOServerHarness) AddInstance ¶
func (h *IOServerHarness) AddInstance(srv *IOServerInstance) error
AddInstance adds a new IOServer instance to be managed.
func (*IOServerHarness) AwaitStorageReady ¶
func (h *IOServerHarness) AwaitStorageReady(ctx context.Context, skipMissingSuperblock bool) error
AwaitStorageReady blocks until all managed IOServer instances have storage available and ready to be used.
func (*IOServerHarness) CreateSuperblocks ¶
func (h *IOServerHarness) CreateSuperblocks(recreate bool) error
CreateSuperblocks creates instance superblocks as needed.
func (*IOServerHarness) GetMSLeaderInstance ¶
func (h *IOServerHarness) GetMSLeaderInstance() (*IOServerInstance, error)
GetMSLeaderInstance returns a managed IO Server instance to be used as a management target and fails if selected instance is not MS Leader.
func (*IOServerHarness) Instances ¶
func (h *IOServerHarness) Instances() []*IOServerInstance
func (*IOServerHarness) IsStarted ¶
func (h *IOServerHarness) IsStarted() bool
func (*IOServerHarness) Start ¶
func (h *IOServerHarness) Start(parent context.Context) error
Start starts all configured instances and the management service, then waits for them to exit.
func (*IOServerHarness) StartManagementService ¶
func (h *IOServerHarness) StartManagementService(ctx context.Context) error
StartManagementService starts the DAOS management service on this node.
type IOServerInstance ¶
IOServerInstance encapsulates control-plane specific configuration and functionality for managed I/O server instances. The distinction between this structure and what's in the ioserver package is that the ioserver package is only concerned with configuring and executing a single daos_io_server instance. IOServerInstance is intended to be used with IOServerHarness to manage and monitor multiple instances per node.
func NewIOServerInstance ¶
func NewIOServerInstance(log logging.Logger, bcp *bdev.ClassProvider, sp *scm.Provider, msc *mgmtSvcClient, r IOServerStarter) *IOServerInstance
NewIOServerInstance returns an *IOServerInstance initialized with its dependencies.
func (*IOServerInstance) AwaitReady ¶
func (srv *IOServerInstance) AwaitReady() chan *srvpb.NotifyReadyReq
AwaitReady returns a channel which receives a ready message when the started IOServer instance indicates that it is ready to receive dRPC messages.
func (*IOServerInstance) AwaitStorageReady ¶
func (srv *IOServerInstance) AwaitStorageReady(ctx context.Context)
AwaitStorageReady blocks until the IOServer's storage is ready.
func (*IOServerInstance) BioErrorNotify ¶ added in v0.8.0
func (srv *IOServerInstance) BioErrorNotify(bio *srvpb.BioErrorReq)
func (*IOServerInstance) CallDrpc ¶
func (srv *IOServerInstance) CallDrpc(module, method int32, body proto.Message) (*drpc.Response, error)
CallDrpc makes the supplied dRPC call via this instance's dRPC client.
func (*IOServerInstance) CreateSuperblock ¶
func (srv *IOServerInstance) CreateSuperblock(msInfo *mgmtInfo) error
CreateSuperblock creates the superblock for this instance.
func (*IOServerInstance) Index ¶
func (srv *IOServerInstance) Index() uint32
Index returns the server index assigned by the harness.
func (*IOServerInstance) IsMSReplica ¶
func (srv *IOServerInstance) IsMSReplica() bool
IsMSReplica indicates whether or not this instance is a management service replica.
func (*IOServerInstance) LoadModules ¶ added in v0.8.0
func (srv *IOServerInstance) LoadModules() error
LoadModules initiates the I/O server startup sequence.
func (*IOServerInstance) MountScmDevice ¶
func (srv *IOServerInstance) MountScmDevice() error
MountScmDevice 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 (*IOServerInstance) NeedsScmFormat ¶
func (srv *IOServerInstance) NeedsScmFormat() (bool, error)
NeedsScmFormat probes the configured instance storage and determines whether or not it requires a format operation before it can be used.
func (*IOServerInstance) NeedsSuperblock ¶
func (srv *IOServerInstance) NeedsSuperblock() (bool, error)
NeedsSuperblock indicates whether or not the instance appears to need a superblock to be created in order to start.
func (*IOServerInstance) NotifyReady ¶
func (srv *IOServerInstance) NotifyReady(msg *srvpb.NotifyReadyReq)
NotifyReady receives a ready message from the running IOServer instance.
func (*IOServerInstance) NotifyStorageReady ¶
func (srv *IOServerInstance) NotifyStorageReady()
NotifyStorageReady releases any blocks on AwaitStorageReady().
func (*IOServerInstance) ReadSuperblock ¶
func (srv *IOServerInstance) ReadSuperblock() error
ReadSuperblock reads the instance's superblock from storage.
func (*IOServerInstance) SetIndex ¶
func (srv *IOServerInstance) SetIndex(idx uint32)
SetIndex sets the server index assigned by the harness.
func (*IOServerInstance) SetRank ¶
func (srv *IOServerInstance) SetRank(ctx context.Context, ready *srvpb.NotifyReadyReq) error
SetRank determines the instance rank and sends a SetRank dRPC request to the IOServer.
func (*IOServerInstance) Start ¶
func (srv *IOServerInstance) Start(ctx context.Context, errChan chan<- error) error
Start checks to make sure that the instance has a valid superblock before performing any required NVMe preparation steps and launching a managed daos_io_server instance.
func (*IOServerInstance) StartManagementService ¶
func (srv *IOServerInstance) StartManagementService() error
StartManagementService starts the DAOS management service replica associated with this instance. If no replica is associated with this instance, this function is a no-op.
func (*IOServerInstance) WriteSuperblock ¶
func (srv *IOServerInstance) WriteSuperblock() error
WriteSuperblock writes the instance's superblock to storage.
type IOServerStarter ¶
type IOServerStarter interface { Start(context.Context, chan<- error) error GetConfig() *ioserver.Config }
IOServerStarter defines an interface for starting the actual daos_io_server.
type SecurityModule ¶
type SecurityModule struct {
// contains filtered or unexported fields
}
SecurityModule is the security drpc module struct
func NewSecurityModule ¶
func NewSecurityModule(tc *security.TransportConfig) *SecurityModule
NewSecurityModule creates a new security module with a transport config
func (*SecurityModule) HandleCall ¶
func (m *SecurityModule) HandleCall(session *drpc.Session, method int32, body []byte) ([]byte, error)
HandleCall is the handler for calls to the SecurityModule
type StorageControlService ¶
type StorageControlService struct {
// contains filtered or unexported fields
}
StorageControlService encapsulates the storage part of the control service
func DefaultStorageControlService ¶
func DefaultStorageControlService(log logging.Logger, cfg *Configuration) (*StorageControlService, error)
DefaultStorageControlService returns a initialized *StorageControlService with default behaviour
func NewStorageControlService ¶
func NewStorageControlService(log logging.Logger, bdev *bdev.Provider, scm *scm.Provider, srvCfgs []*ioserver.Config) *StorageControlService
NewStorageControlService returns an initialized *StorageControlService
func (*StorageControlService) GetScmState ¶
func (c *StorageControlService) GetScmState() (storage.ScmState, error)
GetScmState performs required initialisation and returns current state of SCM module preparation.
func (*StorageControlService) NvmePrepare ¶
func (c *StorageControlService) NvmePrepare(req bdev.PrepareRequest) (*bdev.PrepareResponse, error)
NvmePrepare preps locally attached SSDs and returns error.
Suitable for commands invoked directly on server, not over gRPC.
func (*StorageControlService) NvmeScan ¶
func (c *StorageControlService) NvmeScan() (*bdev.ScanResponse, error)
NvmeScan scans locally attached SSDs and returns list directly.
Suitable for commands invoked directly on server, not over gRPC.
func (*StorageControlService) ScmPrepare ¶
func (c *StorageControlService) ScmPrepare(req scm.PrepareRequest) (*scm.PrepareResponse, error)
ScmPrepare preps locally attached modules and returns need to reboot message, list of pmem device files and error directly.
Suitable for commands invoked directly on server, not over gRPC.
func (*StorageControlService) ScmScan ¶
func (c *StorageControlService) ScmScan() (*scm.ScanResponse, error)
ScmScan scans locally attached modules, namespaces and state of DCPM config.
Suitable for commands invoked directly on server, not over gRPC.
func (*StorageControlService) Setup ¶
func (c *StorageControlService) Setup() error
Setup delegates to Storage implementation's Setup methods.
func (*StorageControlService) StoragePrepare ¶
func (c *StorageControlService) StoragePrepare(ctx context.Context, req *ctlpb.StoragePrepareReq) ( *ctlpb.StoragePrepareResp, error)
StoragePrepare configures SSDs for user specific access with SPDK and groups SCM modules in AppDirect/interleaved mode as kernel "pmem" devices.
func (*StorageControlService) StorageScan ¶
func (c *StorageControlService) StorageScan(ctx context.Context, req *ctlpb.StorageScanReq) (*ctlpb.StorageScanResp, error)
StorageScan discovers non-volatile storage hardware on node.
type Superblock ¶
type Superblock struct { Version uint8 UUID string System string Rank *ioserver.Rank ValidRank bool MS bool CreateMS bool BootstrapMS bool }
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
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
(C) Copyright 2019 Intel Corporation.
|
(C) Copyright 2019 Intel Corporation. |
(C) Copyright 2019 Intel Corporation.
|
(C) Copyright 2019 Intel Corporation. |
bdev
(C) Copyright 2019 Intel Corporation.
|
(C) Copyright 2019 Intel Corporation. |
scm
(C) Copyright 2019 Intel Corporation.
|
(C) Copyright 2019 Intel Corporation. |