Documentation ¶
Overview ¶
(C) Copyright 2020 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.
(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
- Variables
- func CheckReplica(lis net.Listener, accessPoints []string, srv *exec.Cmd) (msReplicaCheck string, err error)
- func FaultBdevNotFound(bdevs []string) *fault.Fault
- func FaultConfigDuplicateFabric(curIdx, seenIdx int) *fault.Fault
- func FaultConfigDuplicateLogFile(curIdx, seenIdx int) *fault.Fault
- func FaultConfigDuplicateScmDeviceList(curIdx, seenIdx int) *fault.Fault
- func FaultConfigDuplicateScmMount(curIdx, seenIdx int) *fault.Fault
- func FaultConfigOverlappingBdevDeviceList(curIdx, seenIdx int) *fault.Fault
- func FaultPoolNvmeTooSmall(reqBytes uint64, targetCount int) *fault.Fault
- func FaultPoolScmTooSmall(reqBytes uint64, targetCount int) *fault.Fault
- func FaultScmUnmanaged(mntPoint string) *fault.Fault
- func NewRankResult(rank uint32, action string, state system.MemberState, err error) *mgmtpb.RanksResp_RankResult
- 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) SetPath(inPath string) error
- func (c *Configuration) Validate(log logging.Logger) (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) 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) 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
- 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) SystemQuery(parent context.Context, req *ctlpb.SystemQueryReq) (*ctlpb.SystemQueryResp, error)
- func (svc *ControlService) SystemStart(parent context.Context, req *ctlpb.SystemStartReq) (*ctlpb.SystemStartResp, error)
- func (svc *ControlService) SystemStop(parent context.Context, req *ctlpb.SystemStopReq) (*ctlpb.SystemStopResp, error)
- type External
- type HarnessClient
- 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) IsRestartable() bool
- func (h *IOServerHarness) IsStarted() bool
- func (h *IOServerHarness) RestartInstances() error
- func (h *IOServerHarness) Start(parent context.Context, membership *system.Membership, cfg *Configuration) error
- func (h *IOServerHarness) StartManagementService(ctx context.Context) error
- func (h *IOServerHarness) StartedRanks() []*ioserver.Rank
- 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) IsStarted() 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) SetTargetCount(numTargets int)
- func (srv *IOServerInstance) Start(ctx context.Context, errChan chan<- error) error
- func (srv *IOServerInstance) StartManagementService() error
- func (srv *IOServerInstance) Stop(force bool) error
- func (srv *IOServerInstance) WriteSuperblock() error
- type IOServerRunner
- 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.
const ( ControlPlaneName = "DAOS Control Server" // DataPlaneName defines a consistent name for the ioserver. DataPlaneName = "DAOS I/O Server" )
Variables ¶
var ( FaultUnknown = serverFault( code.ServerUnknown, "unknown control server error", "") FaultBadConfig = serverFault( code.ServerBadConfig, "insufficient information in configuration", "supply path to valid configuration file, use examples for reference", ) FaultConfigNoPath = serverFault( code.ServerNoConfigPath, "configuration file path not set", "supply the path to a server configuration file when restarting the control server with commandline option '-o'", ) FaultConfigBadControlPort = serverFault( code.ServerConfigBadControlPort, "invalid control port in configuration", "specify a nonzero control port in configuration ('port' parameter) and restart the control server", ) FaultConfigBadAccessPoints = serverFault( code.ServerConfigBadAccessPoints, "invalid list of access points in configuration", "only a single access point is currently supported, specify only one and restart the control server", ) FaultConfigNoProvider = serverFault( code.ServerConfigBadProvider, "provider not specified in configuration", "specify a valid network provider in configuration ('provider' parameter) and restart the control server", ) FaultConfigNoServers = serverFault( code.ServerConfigNoServers, "no DAOS IO Servers specified in configuration", "specify at least one IO Server configuration ('servers' list parameter) and restart the control server", ) )
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 FaultBdevNotFound ¶ added in v0.9.1
func FaultConfigDuplicateFabric ¶ added in v0.9.0
func FaultConfigDuplicateLogFile ¶ added in v0.9.0
func FaultConfigDuplicateScmDeviceList ¶ added in v0.9.0
func FaultConfigDuplicateScmMount ¶ added in v0.9.0
func FaultConfigOverlappingBdevDeviceList ¶ added in v0.9.0
func FaultPoolNvmeTooSmall ¶ added in v0.9.1
func FaultPoolScmTooSmall ¶ added in v0.9.1
func FaultScmUnmanaged ¶ added in v0.9.0
func NewRankResult ¶ added in v0.9.0
func NewRankResult(rank uint32, action string, state system.MemberState, err error) *mgmtpb.RanksResp_RankResult
NewRankResult returns a reference to a new member result struct.
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"` SetHugepages bool `yaml:"set_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"` 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 // 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) SetPath ¶
func (c *Configuration) SetPath(inPath string) error
SetPath sets the default path to the configuration file.
func (*Configuration) Validate ¶
func (c *Configuration) Validate(log logging.Logger) (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) 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) 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.
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 *system.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) SystemQuery ¶ added in v0.9.0
func (svc *ControlService) SystemQuery(parent context.Context, req *ctlpb.SystemQueryReq) (*ctlpb.SystemQueryResp, error)
SystemQuery implements the method defined for the Management Service.
Return system status.
func (*ControlService) SystemStart ¶ added in v0.9.0
func (svc *ControlService) SystemStart(parent context.Context, req *ctlpb.SystemStartReq) (*ctlpb.SystemStartResp, error)
SystemStart implements the method defined for the Management Service.
Initiate controlled start of DAOS system.
TODO: specify the specific ranks that should be started in request.
func (*ControlService) SystemStop ¶
func (svc *ControlService) SystemStop(parent context.Context, req *ctlpb.SystemStopReq) (*ctlpb.SystemStopResp, error)
SystemStop implements the method defined for the Management Service.
Initiate controlled shutdown of DAOS system.
TODO: specify the ranks managed by the harness that should be started.
type External ¶
type External interface {
// contains filtered or unexported methods
}
External interface provides methods to support various os operations.
type HarnessClient ¶ added in v0.9.0
type HarnessClient interface { Query(context.Context, string, ...uint32) (system.MemberResults, error) PrepShutdown(context.Context, string, ...uint32) (system.MemberResults, error) Stop(context.Context, string, bool, ...uint32) (system.MemberResults, error) Start(context.Context, string, ...uint32) (system.MemberResults, error) }
HarnessClient provides methods for requesting actions on remote harnesses (attached to listening gRPC servers) identified by host addresses.
Results will be provided for each rank (member) managed by harness. Single gRPC sent over management network per harness (not per rank).
func NewHarnessClient ¶ added in v0.9.0
func NewHarnessClient(l logging.Logger, h *IOServerHarness) HarnessClient
NewHarnessClient returns a new harnessClient reference containing a reference to the harness on the locally running control server.
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) IsRestartable ¶ added in v0.9.0
func (h *IOServerHarness) IsRestartable() bool
func (*IOServerHarness) IsStarted ¶
func (h *IOServerHarness) IsStarted() bool
func (*IOServerHarness) RestartInstances ¶ added in v0.9.0
func (h *IOServerHarness) RestartInstances() error
RestartInstances will signal the harness to restart configured instances.
func (*IOServerHarness) Start ¶
func (h *IOServerHarness) Start(parent context.Context, membership *system.Membership, cfg *Configuration) error
Start starts all configured instances, waits for them to be ready and then loops monitoring instance exit, harness exit and harness restart signals.
func (*IOServerHarness) StartManagementService ¶
func (h *IOServerHarness) StartManagementService(ctx context.Context) error
StartManagementService starts the DAOS management service on this node.
func (*IOServerHarness) StartedRanks ¶ added in v0.9.0
func (h *IOServerHarness) StartedRanks() []*ioserver.Rank
StartedRanks returns rank assignment of configured harness instances that are in a running state. Rank assignments can be nil.
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 IOServerRunner) *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) IsStarted ¶ added in v0.9.0
func (srv *IOServerInstance) IsStarted() bool
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) SetTargetCount ¶ added in v0.9.1
func (srv *IOServerInstance) SetTargetCount(numTargets int)
SetTargetCount updates target count in ioserver config.
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) Stop ¶ added in v0.9.0
func (srv *IOServerInstance) Stop(force bool) error
func (*IOServerInstance) WriteSuperblock ¶
func (srv *IOServerInstance) WriteSuperblock() error
WriteSuperblock writes the instance's superblock to storage.
type IOServerRunner ¶ added in v0.9.0
type IOServerRunner interface { Start(context.Context, chan<- error) error IsRunning() bool Stop(bool) error GetConfig() *ioserver.Config }
IOServerRunner defines an interface for starting and stopping the daos_io_server.
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(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 ¶
- config.go
- ctl_harness.go
- ctl_network_rpc.go
- ctl_storage.go
- ctl_storage_rpc.go
- ctl_svc.go
- ctl_system.go
- drpc.go
- external.go
- external_mocks.go
- faults.go
- harness.go
- hugepages.go
- instance.go
- interceptors.go
- loglevel.go
- mgmt_client.go
- mgmt_drpc.go
- mgmt_svc.go
- security_rpc.go
- server.go
- superblock.go
- test_utils.go
Directories ¶
Path | Synopsis |
---|---|
(C) Copyright 2019 Intel Corporation.
|
(C) Copyright 2019 Intel Corporation. |
(C) Copyright 2019-2020 Intel Corporation.
|
(C) Copyright 2019-2020 Intel Corporation. |
bdev
(C) Copyright 2019-2020 Intel Corporation.
|
(C) Copyright 2019-2020 Intel Corporation. |
scm
(C) Copyright 2019-2020 Intel Corporation.
|
(C) Copyright 2019-2020 Intel Corporation. |