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.
Index ¶
- Constants
- type Config
- func (c *Config) CmdLineArgs() ([]string, error)
- func (c *Config) CmdLineEnv() ([]string, error)
- func (c *Config) HasEnvVar(name string) bool
- func (c *Config) Validate() error
- func (c *Config) WithBdevClass(bdevClass string) *Config
- func (c *Config) WithBdevConfigPath(cfgPath string) *Config
- func (c *Config) WithBdevDeviceCount(count int) *Config
- func (c *Config) WithBdevDeviceList(devices ...string) *Config
- func (c *Config) WithBdevFileSize(size int) *Config
- func (c *Config) WithEnvVars(newVars ...string) *Config
- func (c *Config) WithFabricInterface(iface string) *Config
- func (c *Config) WithFabricInterfacePort(ifacePort int) *Config
- func (c *Config) WithFabricProvider(provider string) *Config
- func (c *Config) WithHelperStreamCount(count int) *Config
- func (c *Config) WithHostname(name string) *Config
- func (c *Config) WithLogFile(logPath string) *Config
- func (c *Config) WithLogMask(logMask string) *Config
- func (c *Config) WithModules(mList string) *Config
- func (c *Config) WithPinnedNumaNode(numa *uint) *Config
- func (c *Config) WithRank(r uint32) *Config
- func (c *Config) WithScmClass(scmClass string) *Config
- func (c *Config) WithScmDeviceList(devices ...string) *Config
- func (c *Config) WithScmMountPoint(scmPath string) *Config
- func (c *Config) WithScmRamdiskSize(size int) *Config
- func (c *Config) WithServiceThreadCore(idx int) *Config
- func (c *Config) WithShmID(shmID int) *Config
- func (c *Config) WithSocketDir(dir string) *Config
- func (c *Config) WithSystemName(name string) *Config
- func (c *Config) WithTargetCount(count int) *Config
- type ExitStatus
- type FabricConfig
- type Rank
- type Runner
- type StorageConfig
- type TestRunner
- type TestRunnerConfig
Constants ¶
const ( // NvmeMinBytesPerTarget is min NVMe pool allocation per target NvmeMinBytesPerTarget = 1 * humanize.GiByte // ScmMinBytesPerTarget is min SCM pool allocation per target ScmMinBytesPerTarget = 16 * humanize.MiByte )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Rank *Rank `yaml:"rank,omitempty"` Modules string `yaml:"modules,omitempty" cmdLongFlag:"--modules" cmdShortFlag:"-m"` TargetCount int `yaml:"targets,omitempty" cmdLongFlag:"--targets,nonzero" cmdShortFlag:"-t,nonzero"` HelperStreamCount int `yaml:"nr_xs_helpers" cmdLongFlag:"--xshelpernr" cmdShortFlag:"-x"` ServiceThreadCore int `yaml:"first_core" cmdLongFlag:"--firstcore,nonzero" cmdShortFlag:"-f,nonzero"` SystemName string `yaml:"name,omitempty" cmdLongFlag:"--group" cmdShortFlag:"-g"` SocketDir string `yaml:"socket_dir,omitempty" cmdLongFlag:"--socket_dir" cmdShortFlag:"-d"` LogMask string `yaml:"log_mask,omitempty" cmdEnv:"D_LOG_MASK"` LogFile string `yaml:"log_file,omitempty" cmdEnv:"D_LOG_FILE"` Storage StorageConfig `yaml:",inline"` Fabric FabricConfig `yaml:",inline"` EnvVars []string `yaml:"env_vars,omitempty"` Index uint32 `yaml:"-" cmdLongFlag:"--instance_idx" cmdShortFlag:"-I"` }
Config encapsulates an I/O server's configuration.
func (*Config) CmdLineArgs ¶
CmdLineArgs returns a slice of command line arguments to be supplied when starting an I/O server instance.
func (*Config) CmdLineEnv ¶
CmdLineEnv returns a slice of environment variables to be supplied when starting an I/O server instance.
func (*Config) HasEnvVar ¶ added in v0.9.0
HasEnvVar returns true if the configuration contains an environment variable with the given name.
func (*Config) WithBdevClass ¶
WithBdevClass defines the type of block device storage to be used.
func (*Config) WithBdevConfigPath ¶
WithBdevConfigPath sets the path to the generated NVMe config file used by SPDK.
func (*Config) WithBdevDeviceCount ¶
WithBdevDeviceCount sets the number of devices to be created when BdevClass is malloc.
func (*Config) WithBdevDeviceList ¶
WithBdevDeviceList sets the list of block devices to be used.
func (*Config) WithBdevFileSize ¶
WithBdevFileSize sets the backing file size (used when BdevClass is malloc or file).
func (*Config) WithEnvVars ¶
WithEnvVars applies the supplied list of environment variables to any existing variables, with new values overwriting existing values.
func (*Config) WithFabricInterface ¶
WithFabricInterface sets the interface name to be used by this instance.
func (*Config) WithFabricInterfacePort ¶
WithFabricInterfacePort sets the numeric interface port to be used by this instance.
func (*Config) WithFabricProvider ¶
WithFabricProvider sets the name of the CArT fabric provider.
func (*Config) WithHelperStreamCount ¶
WithHelperStreamCount sets the number of XS Helper streams to run on this instance.
func (*Config) WithHostname ¶
WithHostname sets the hostname to be used when generating NVMe configurations.
func (*Config) WithLogFile ¶
WithLogFile sets the path to the log file to be used by this instance.
func (*Config) WithLogMask ¶
WithLogMask sets the DAOS logging mask to be used by this instance.
func (*Config) WithModules ¶
WithModules sets the list of I/O server modules to be loaded.
func (*Config) WithPinnedNumaNode ¶
WithPinnedNumaNode sets the NUMA node affinity for the I/O server instance
func (*Config) WithScmClass ¶
WithScmClass defines the type of SCM storage to be configured.
func (*Config) WithScmDeviceList ¶
WithScmDeviceList sets the list of devices to be used for SCM storage.
func (*Config) WithScmMountPoint ¶
WithScmMountPath sets the path to the device used for SCM storage.
func (*Config) WithScmRamdiskSize ¶
WithScmRamdiskSize sets the size (in GB) of the ramdisk used to emulate SCM (no effect if ScmClass is not RAM).
func (*Config) WithServiceThreadCore ¶
WithServiceThreadCore sets the core index to be used for running DAOS service threads.
func (*Config) WithSocketDir ¶
WithSocketDir sets the path to the instance's dRPC socket directory.
func (*Config) WithSystemName ¶
WithSystemName sets the system name to which the instance belongs.
func (*Config) WithTargetCount ¶
WithTargetCount sets the number of VOS targets to run on this instance.
type ExitStatus ¶
type ExitStatus string
ExitStatus implements the error interface and is used to indicate special IOserver exit conditions.
const ( // NormalExit indicates that the process exited without error NormalExit ExitStatus = "process exited with 0" )
func (ExitStatus) Error ¶
func (es ExitStatus) Error() string
type FabricConfig ¶
type FabricConfig struct { Provider string `yaml:"provider,omitempty" cmdEnv:"CRT_PHY_ADDR_STR"` Interface string `yaml:"fabric_iface,omitempty" cmdEnv:"OFI_INTERFACE"` InterfacePort int `yaml:"fabric_iface_port,omitempty" cmdEnv:"OFI_PORT,nonzero"` PinnedNumaNode *uint `yaml:"pinned_numa_node,omitempty" cmdLongFlag:"--pinned_numa_node" cmdShortFlag:"-p"` }
FabricConfig encapsulates networking fabric configuration.
func (*FabricConfig) GetNumaNode ¶
func (fc *FabricConfig) GetNumaNode() (uint, error)
GetNumaNode retrieves the value configured by the YML if it was supplied returns an error if it was not configured.
func (*FabricConfig) Update ¶
func (fc *FabricConfig) Update(other FabricConfig)
Update fills in any missing fields from the provided FabricConfig.
func (*FabricConfig) Validate ¶
func (fc *FabricConfig) Validate() error
Validate ensures that the configuration meets minimum standards.
type Rank ¶
type Rank uint32
Rank is used to uniquely identify a server within a cluster
func NewRankPtr ¶
func (*Rank) Equals ¶
Equals compares this rank to the given rank. If either value is nil, the comparison is always false.
func (*Rank) UnmarshalYAML ¶
type Runner ¶
type Runner struct { Config *Config // contains filtered or unexported fields }
Runner starts and manages an instance of a DAOS I/O Server
func (*Runner) IsRunning ¶ added in v0.9.0
IsRunning indicates whether the Runner process is running or not.
type StorageConfig ¶
type StorageConfig struct { SCM storage.ScmConfig `yaml:",inline"` Bdev storage.BdevConfig `yaml:",inline"` }
StorageConfig encapsulates an I/O server's storage configuration.
func (*StorageConfig) Validate ¶
func (sc *StorageConfig) Validate() error
Validate ensures that the configuration meets minimum standards.
type TestRunner ¶
type TestRunner struct {
// contains filtered or unexported fields
}
func NewTestRunner ¶
func NewTestRunner(trc *TestRunnerConfig, sc *Config) *TestRunner
func (*TestRunner) GetConfig ¶
func (tr *TestRunner) GetConfig() *Config
func (*TestRunner) IsRunning ¶ added in v0.9.0
func (tr *TestRunner) IsRunning() bool
func (*TestRunner) Start ¶
func (tr *TestRunner) Start(ctx context.Context, errChan chan<- error) error
func (*TestRunner) Stop ¶ added in v0.9.0
func (tr *TestRunner) Stop(bool) error