Documentation ¶
Index ¶
- Constants
- func IsNUMAMismatch(err error) bool
- func MergeLogEnvVars(logMasks, subsystemsStr string) (string, error)
- func ValidateLogMasks(masks string) error
- func ValidateLogStreams(streams string) error
- func ValidateLogSubsystems(subsystems string) error
- type Config
- func (c *Config) AppendStorage(cfgs ...*storage.TierConfig) *Config
- func (c *Config) CmdLineArgs() ([]string, error)
- func (c *Config) CmdLineEnv() ([]string, error)
- func (c *Config) GetEnvVar(name string) (string, error)
- func (c *Config) HasEnvVar(name string) bool
- func (c *Config) ReadLogDbgStreams() (string, error)
- func (c *Config) ReadLogSubsystems() (string, error)
- func (c *Config) SetNUMAAffinity(node uint) error
- func (c *Config) UpdatePMDKEnvars() error
- func (c *Config) UpdatePMDKEnvarsPMemobjConf(isDCPM bool) error
- func (c *Config) UpdatePMDKEnvarsStackSizeDCPM() error
- func (c *Config) Validate() error
- func (c *Config) WithBypassHealthChk(bypass *bool) *Config
- func (c *Config) WithCrtTimeout(timeout uint32) *Config
- func (c *Config) WithEnvPassThrough(allowList ...string) *Config
- func (c *Config) WithEnvVarAbtThreadStackSize(stack_size uint16) *Config
- func (c *Config) WithEnvVarPMemObjSdsAtCreate(value uint8) *Config
- func (c *Config) WithEnvVars(newVars ...string) *Config
- func (c *Config) WithFabricAuthKey(key string) *Config
- func (c *Config) WithFabricInterface(iface string) *Config
- func (c *Config) WithFabricInterfacePort(ifacePort int) *Config
- func (c *Config) WithFabricNumaNodeIndex(nodeIndex uint) *Config
- func (c *Config) WithFabricProvider(provider string) *Config
- func (c *Config) WithHelperStreamCount(count int) *Config
- func (c *Config) WithHugepageSize(hugepagesz int) *Config
- func (c *Config) WithIndex(i uint32) *Config
- func (c *Config) WithLogFile(logPath string) *Config
- func (c *Config) WithLogMask(logMask string) *Config
- func (c *Config) WithLogStreams(streams string) *Config
- func (c *Config) WithLogSubsystems(subsystems string) *Config
- func (c *Config) WithMemSize(memsize int) *Config
- func (c *Config) WithModules(mList string) *Config
- func (c *Config) WithNumSecondaryEndpoints(nr []int) *Config
- func (c *Config) WithPinnedNumaNode(numa uint) *Config
- func (c *Config) WithServiceThreadCore(idx int) *Config
- func (c *Config) WithSocketDir(dir string) *Config
- func (c *Config) WithSrxDisabled(disable bool) *Config
- func (c *Config) WithStorage(cfgs ...*storage.TierConfig) *Config
- func (c *Config) WithStorageAccelProps(name string, mask storage.AccelOptionBits) *Config
- func (c *Config) WithStorageAutoFaultyCriteria(enable bool, maxIoErrs, maxCsumErrs uint32) *Config
- func (c *Config) WithStorageConfigOutputPath(cfgPath string) *Config
- func (c *Config) WithStorageControlMetadataDevice(device string) *Config
- func (c *Config) WithStorageControlMetadataPath(path string) *Config
- func (c *Config) WithStorageEnableHotplug(enable bool) *Config
- func (c *Config) WithStorageIndex(i uint32) *Config
- func (c *Config) WithStorageNumaNodeIndex(nodeIndex uint) *Config
- func (c *Config) WithStorageSpdkRpcSrvProps(enable bool, sockAddr string) *Config
- func (c *Config) WithStorageVosEnv(ve string) *Config
- func (c *Config) WithSystemName(name string) *Config
- func (c *Config) WithTargetCount(count int) *Config
- type FabricConfig
- func (fc *FabricConfig) GetAuthKeyEnv() string
- func (fc *FabricConfig) GetInterfacePorts() ([]int, error)
- func (fc *FabricConfig) GetInterfaces() ([]string, error)
- func (fc *FabricConfig) GetNumProviders() int
- func (fc *FabricConfig) GetPrimaryInterface() (string, error)
- func (fc *FabricConfig) GetPrimaryProvider() (string, error)
- func (fc *FabricConfig) GetProviders() ([]string, error)
- func (fc *FabricConfig) Update(other FabricConfig)
- func (fc *FabricConfig) Validate() error
- type LogLevel
- type Runner
- type RunnerExitChan
- type RunnerExitInfo
- 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 )
const (
// MultiProviderSeparator delineates between providers in a multi-provider config.
MultiProviderSeparator = ","
)
Variables ¶
This section is empty.
Functions ¶
func IsNUMAMismatch ¶
IsNUMAMismatch returns true if the supplied error is the result of a NUMA node configuration error.
func MergeLogEnvVars ¶
MergeLogEnvVars merges the value of DD_SUBSYS into D_LOG_MASK. The function takes original D_LOG_MASK and DD_SUBSYS values and returns resultant log_mask. The merge is performed by evaluating DD_SUBSYS list of subsystems to be enabled and appending subsystem log level assignments to D_LOG_MASK list when appropriate.
1. Return D_LOG_MASK if DD_SUBSYS or D_LOG_MASK are unset 2. Identify original base log level from D_LOG_MASK 3. Enumerate subsystem level assignments from D_LOG_MASK. 4. Remove assignments if level < ERROR and subsystem not in subsystems slice. Log a warning. 5. Add assignments if base level < ERROR and subsystem in subsystems slice. 6. Remove any assignment where level is equal to the new base level. 7. Return new log masks generated from assignments and the new base level.
func ValidateLogMasks ¶
ValidateLogMasks provides validation for log-masks string specifier.
The input string should look like: PREFIX1=LEVEL1,PREFIX2=LEVEL2,... LEVELs are validated here whilst PREFIX (subsystem) is validated server side.
func ValidateLogStreams ¶
ValidateLogStreams provides validation for the stream names provided in the log-masks debug streams string. The input string should look like: STREAM1,STREAM2,...
func ValidateLogSubsystems ¶
ValidateLogSubsystems provides validation for the subsystem names provided in the string. The input string should look like: SUBSYS1,SUBSYS2,...
Types ¶
type Config ¶
type Config struct { 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,omitempty" cmdLongFlag:"--firstcore" cmdShortFlag:"-f"` SystemName string `yaml:"-" cmdLongFlag:"--group" cmdShortFlag:"-g"` SocketDir string `yaml:"-" 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 storage.Config `yaml:",inline,omitempty"` Fabric FabricConfig `yaml:",inline"` EnvVars []string `yaml:"env_vars,omitempty"` EnvPassThrough []string `yaml:"env_pass_through,omitempty"` PinnedNumaNode *uint `yaml:"pinned_numa_node,omitempty" cmdLongFlag:"--pinned_numa_node" cmdShortFlag:"-p"` Index uint32 `yaml:"-" cmdLongFlag:"--instance_idx" cmdShortFlag:"-I"` MemSize int `yaml:"-" cmdLongFlag:"--mem_size" cmdShortFlag:"-r"` HugepageSz int `yaml:"-" cmdLongFlag:"--hugepage_size" cmdShortFlag:"-H"` CheckerEnabled bool `yaml:"-" cmdLongFlag:"--checker" cmdShortFlag:"-C"` }
Config encapsulates an I/O Engine's configuration.
func MockConfig ¶
func MockConfig() *Config
MockConfig returns an I/O Engine config set up for testing.
func (*Config) AppendStorage ¶
func (c *Config) AppendStorage(cfgs ...*storage.TierConfig) *Config
AppendStorage appends the given storage tier configurations to the existing set of storage configs.
func (*Config) CmdLineArgs ¶
CmdLineArgs returns a slice of command line arguments to be supplied when starting an I/O Engine instance.
func (*Config) CmdLineEnv ¶
CmdLineEnv returns a slice of environment variables to be supplied when starting an I/O Engine instance.
func (*Config) GetEnvVar ¶
GetEnvVar returns the value of the given environment variable to be supplied when starting an I/O engine instance.
func (*Config) HasEnvVar ¶
HasEnvVar returns true if the configuration contains an environment variable with the given name.
func (*Config) ReadLogDbgStreams ¶
ReadLogDbgStreams extracts the value of DD_MASK from engine config env_vars.
func (*Config) ReadLogSubsystems ¶
ReadLogSubsystems extracts the value of DD_SUBSYS from engine config env_vars.
func (*Config) SetNUMAAffinity ¶
SetNUMAAffinity sets the NUMA affinity for the engine, if not already set in the configuration.
func (*Config) UpdatePMDKEnvars ¶
Ensure proper environment variables for PMDK w/ NDCTL enabled based on the actual configuration of the storage class.
func (*Config) UpdatePMDKEnvarsPMemobjConf ¶
Ensure proper configuration of shutdown (SDS) state
func (*Config) UpdatePMDKEnvarsStackSizeDCPM ¶
Ensure at least 20KiB ABT stack size for an engine with DCPM storage class.
func (*Config) WithBypassHealthChk ¶
WithBypassHealthChk sets the NVME health check bypass for this instance
func (*Config) WithCrtTimeout ¶
WithCrtTimeout defines the CRT_TIMEOUT for this instance
func (*Config) WithEnvPassThrough ¶
WithEnvPassThrough sets a list of environment variable names that will be allowed to pass through into the engine subprocess environment.
func (*Config) WithEnvVarAbtThreadStackSize ¶
WithEnvVarAbtThreadStackSize sets environment variable ABT_THREAD_STACKSIZE.
func (*Config) WithEnvVarPMemObjSdsAtCreate ¶
WithEnvVarPMemObjSdsAtCreate sets PMEMOBJ_CONF env. var. to sds.at_create=0/1 value
func (*Config) WithEnvVars ¶
WithEnvVars applies the supplied list of environment variables to any existing variables, with new values overwriting existing values.
func (*Config) WithFabricAuthKey ¶
WithFabricAuthKey sets the fabric authorization key.
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) WithFabricNumaNodeIndex ¶
WithFabricNumaNodeIndex sets the NUMA node index 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) WithHugepageSize ¶
WithHugepageSize sets the configured hugepage size on this instance.
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) WithLogStreams ¶
WithLogStreams sets the DAOS logging debug streams to be used by this instance.
func (*Config) WithLogSubsystems ¶
WithLogSubsystems sets the DAOS logging subsystems to be used by this instance.
func (*Config) WithMemSize ¶
WithMemSize sets the NVMe memory size for SPDK memory allocation on this instance.
func (*Config) WithModules ¶
WithModules sets the list of I/O Engine modules to be loaded.
func (*Config) WithNumSecondaryEndpoints ¶
WithNumSecondaryEndpoints sets the number of network endpoints for each secondary provider.
func (*Config) WithPinnedNumaNode ¶
WithPinnedNumaNode sets the NUMA node affinity for the I/O Engine instance.
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) WithSrxDisabled ¶
WithSrxDisabled disables or enables SRX.
func (*Config) WithStorage ¶
func (c *Config) WithStorage(cfgs ...*storage.TierConfig) *Config
WithStorage creates the set of storage tier configurations. Note that this method replaces any existing configs. To append, use AppendStorage().
func (*Config) WithStorageAccelProps ¶
func (c *Config) WithStorageAccelProps(name string, mask storage.AccelOptionBits) *Config
WithStorageAccelProps sets the acceleration properties for the I/O Engine instance.
func (*Config) WithStorageAutoFaultyCriteria ¶
WithStorageAutoFaultyCriteria specifies NVMe auto-faulty settings in the I/O Engine.
func (*Config) WithStorageConfigOutputPath ¶
WithStorageConfigOutputPath sets the path to the generated NVMe config file used by SPDK.
func (*Config) WithStorageControlMetadataDevice ¶
WithStorageControlMetadataDevice sets the metadata device to be used by this instance.
func (*Config) WithStorageControlMetadataPath ¶
WithStorageControlMetadataPath sets the metadata path to be used by this instance.
func (*Config) WithStorageEnableHotplug ¶
WithStorageEnableHotplug sets EnableHotplug in engine storage.
func (*Config) WithStorageIndex ¶
WithStorageIndex sets the I/O Engine instance index in the storage struct.
func (*Config) WithStorageNumaNodeIndex ¶
WithStorageNumaNodeIndex sets the NUMA node index to be used by this instance.
func (*Config) WithStorageSpdkRpcSrvProps ¶
WithStorageSpdkRpcSrvProps specifies whether a SPDK JSON-RPC server will run in the I/O Engine.
func (*Config) WithStorageVosEnv ¶
WithStorageVosEnv sets the VOS_BDEV_CLASS env variable.
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 FabricConfig ¶
type FabricConfig struct { Provider string `yaml:"provider,omitempty" cmdEnv:"D_PROVIDER"` Interface string `yaml:"fabric_iface,omitempty" cmdEnv:"D_INTERFACE"` InterfacePort int `yaml:"fabric_iface_port,omitempty" cmdEnv:"D_PORT,nonzero"` NumaNodeIndex uint `yaml:"-"` BypassHealthChk *bool `yaml:"bypass_health_chk,omitempty" cmdLongFlag:"--bypass_health_chk" cmdShortFlag:"-b"` CrtTimeout uint32 `yaml:"crt_timeout,omitempty" cmdEnv:"CRT_TIMEOUT"` // NumSecondaryEndpoints configures the number of cart endpoints per secondary provider. NumSecondaryEndpoints []int `yaml:"secondary_provider_endpoints,omitempty" cmdLongFlag:"--nr_sec_ctx,nonzero" cmdShortFlag:"-S,nonzero"` DisableSRX bool `yaml:"disable_srx,omitempty" cmdEnv:"FI_OFI_RXM_USE_SRX,invertBool,intBool"` AuthKey string `yaml:"fabric_auth_key,omitempty" cmdEnv:"D_PROVIDER_AUTH_KEY"` }
FabricConfig encapsulates networking fabric configuration.
func (*FabricConfig) GetAuthKeyEnv ¶
func (fc *FabricConfig) GetAuthKeyEnv() string
GetAuthKeyEnv returns the environment variable string for the auth key.
func (*FabricConfig) GetInterfacePorts ¶
func (fc *FabricConfig) GetInterfacePorts() ([]int, error)
GetInterfacePorts parses the InterfacePort string to one or more ports.
func (*FabricConfig) GetInterfaces ¶
func (fc *FabricConfig) GetInterfaces() ([]string, error)
GetInterfaces parses the Interface string into one or more interfaces.
func (*FabricConfig) GetNumProviders ¶
func (fc *FabricConfig) GetNumProviders() int
GetNumProviders gets the number of fabric providers configured.
func (*FabricConfig) GetPrimaryInterface ¶
func (fc *FabricConfig) GetPrimaryInterface() (string, error)
GetPrimaryInterface parses the primary fabric interface from the Interface string.
func (*FabricConfig) GetPrimaryProvider ¶
func (fc *FabricConfig) GetPrimaryProvider() (string, error)
GetPrimaryProvider parses the primary provider from the Provider string.
func (*FabricConfig) GetProviders ¶
func (fc *FabricConfig) GetProviders() ([]string, error)
GetProviders parses the Provider string to one or more providers.
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 LogLevel ¶
type LogLevel uint
LogLevel enum representing engine logging levels.
const ( LogLevelUndefined LogLevel = iota LogLevelDbug LogLevelInfo LogLevelNote LogLevelWarn LogLevelErr LogLevelCrit LogLevelAlrt LogLevelEmrg LogLevelEmit )
LogLevels matching D_LOG API priority strings.
func StrToLogLevel ¶
StrToLogLevel takes an input string and returns a LogLevel type object.
type Runner ¶
type Runner struct { Config *Config // contains filtered or unexported fields }
Runner starts and manages an instance of a DAOS I/O Engine
type RunnerExitChan ¶
type RunnerExitChan chan *RunnerExitInfo
type RunnerExitInfo ¶
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) GetLastPid ¶
func (tr *TestRunner) GetLastPid() uint64
func (*TestRunner) GetRunnerConfig ¶
func (tr *TestRunner) GetRunnerConfig() *TestRunnerConfig
func (*TestRunner) IsRunning ¶
func (tr *TestRunner) IsRunning() bool
func (*TestRunner) Signal ¶
func (tr *TestRunner) Signal(sig os.Signal)
func (*TestRunner) Start ¶
func (tr *TestRunner) Start(ctx context.Context) (RunnerExitChan, error)