Documentation
¶
Overview ¶
Package control provides an API surface for the DAOS Control Plane.
Index ¶
- Constants
- Variables
- func ContSetOwner(ctx context.Context, rpcClient UnaryInvoker, req *ContSetOwnerReq) error
- func DefaultEngineCfg(idx int) *engine.Config
- func FaultConnectionBadHost(srvAddr string) *fault.Fault
- func FaultConnectionClosed(srvAddr string) *fault.Fault
- func FaultConnectionNoRoute(srvAddr string) *fault.Fault
- func FaultConnectionRefused(srvAddr string) *fault.Fault
- func FaultConnectionTimedOut(srvAddr string) *fault.Fault
- func FaultRpcTimeout(req deadliner) *fault.Fault
- func FormatACL(acl *AccessControlList, verbose bool) string
- func FormatACLDefault(acl *AccessControlList) string
- func HTTPReqTimedOut(url string) error
- func IsConfGenerateError(err error) bool
- func IsConnErr(err error) bool
- func IsMSConnectionFailure(err error) bool
- func IsRetryableConnErr(err error) bool
- func MockBdevTier(numaID int, pciAddrIDs ...int) *storage.TierConfig
- func MockBdevTierWithRole(numaID, role int, pciAddrIDs ...int) *storage.TierConfig
- func MockEngineCfg(numaID int, pciAddrIDs ...int) *engine.Config
- func MockEngineCfgTmpfs(numaID, ramdiskSize int, bdevTiers ...*storage.TierConfig) *engine.Config
- func MockFailureMap(idxList ...int) map[int]struct{}
- func MockHostSet(t *testing.T, hosts string) *hostlist.HostSet
- func MockMemInfo() *common.MemInfo
- func MockPoolCreateResp(t *testing.T, config *MockPoolRespConfig) *mgmtpb.PoolCreateResp
- func MockServerCfg(provider string, ecs []*engine.Config) *config.Server
- func MockServerScanResp(t *testing.T, variant string) *ctlpb.StorageScanResp
- func MockStorageScanResp(t *testing.T, mockScmConfigArray []MockScmConfig, ...) *ctlpb.StorageScanResp
- func PoolDestroy(ctx context.Context, rpcClient UnaryInvoker, req *PoolDestroyReq) error
- func PoolEvict(ctx context.Context, rpcClient UnaryInvoker, req *PoolEvictReq) error
- func PoolExtend(ctx context.Context, rpcClient UnaryInvoker, req *PoolExtendReq) error
- func PoolGetProp(ctx context.Context, rpcClient UnaryInvoker, req *PoolGetPropReq) ([]*daos.PoolProperty, error)
- func PoolSetProp(ctx context.Context, rpcClient UnaryInvoker, req *PoolSetPropReq) error
- func PoolUpgrade(ctx context.Context, rpcClient UnaryInvoker, req *PoolUpgradeReq) error
- func StartPProf(log logging.Logger)
- func SystemCheckDisable(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckDisableReq) error
- func SystemCheckEnable(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckEnableReq) error
- func SystemCheckRepair(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckRepairReq) error
- func SystemCheckSetPolicy(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckSetPolicyReq) error
- func SystemCheckStart(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckStartReq) error
- func SystemCheckStop(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckStopReq) error
- func SystemConfigPath() string
- func SystemSetAttr(ctx context.Context, rpcClient UnaryInvoker, req *SystemSetAttrReq) error
- func SystemSetProp(ctx context.Context, rpcClient UnaryInvoker, req *SystemSetPropReq) error
- func UserConfigPath() string
- type AccessControlList
- type BuildInfo
- type CleanupResult
- type Client
- func (c *Client) Debug(msg string)
- func (c *Client) Debugf(fmtStr string, args ...interface{})
- func (c *Client) GetComponent() build.Component
- func (c *Client) GetSystem() string
- func (c *Client) InvokeUnaryRPC(ctx context.Context, req UnaryRequest) (*UnaryResponse, error)
- func (c *Client) InvokeUnaryRPCAsync(parent context.Context, req UnaryRequest) (HostResponseChan, error)
- func (c *Client) SetConfig(cfg *Config)
- type ClientNetworkHint
- type ClientOption
- type CollectLogReq
- type CollectLogResp
- type ConfGenerateError
- type ConfGenerateRemoteReq
- type ConfGenerateRemoteResp
- type ConfGenerateReq
- type ConfGenerateResp
- type Config
- type ContSetOwnerReq
- type DeviceType
- type EventForwarder
- type EventLogger
- type EventNotifyReq
- type EventNotifyResp
- type FirmwareQueryReq
- type FirmwareQueryResp
- type FirmwareUpdateReq
- type FirmwareUpdateResp
- type GetAttachInfoReq
- type GetAttachInfoResp
- type HostErrorSet
- type HostErrorsMap
- type HostErrorsResp
- type HostFabric
- type HostFabricInterface
- type HostFabricMap
- type HostFabricSet
- type HostNVMeQueryMap
- type HostNVMeUpdateMap
- type HostResponse
- type HostResponseChan
- type HostResponseReportFn
- type HostSCMQueryMap
- type HostSCMUpdateMap
- type HostStorage
- type HostStorageMap
- type HostStorageSet
- type Invoker
- type LeaderQueryReq
- type LeaderQueryResp
- type ListPoolsReq
- type ListPoolsResp
- type MetricsListReq
- type MetricsListResp
- type MetricsQueryReq
- type MetricsQueryResp
- type MockFabricScan
- type MockFormatConf
- type MockHostError
- type MockHostStorageConfig
- type MockInvoker
- func (mi *MockInvoker) Debug(msg string)
- func (mi *MockInvoker) Debugf(fmtStr string, args ...interface{})
- func (mi *MockInvoker) GetComponent() build.Component
- func (mi *MockInvoker) GetInvokeCount() int
- func (mi *MockInvoker) GetSystem() string
- func (mi *MockInvoker) InvokeUnaryRPC(ctx context.Context, uReq UnaryRequest) (*UnaryResponse, error)
- func (mi *MockInvoker) InvokeUnaryRPCAsync(ctx context.Context, uReq UnaryRequest) (HostResponseChan, error)
- func (mi *MockInvoker) SetConfig(_ *Config)
- type MockInvokerConfig
- type MockMessage
- type MockNvmeConfig
- type MockPoolRespConfig
- type MockScmConfig
- type MockStorageConfig
- type MockStorageScan
- type NVMeQueryResult
- type NVMeUpdateResult
- type NetworkScanReq
- type NetworkScanResp
- type NvmeAddDeviceReq
- type NvmeAddDeviceResp
- type NvmeRebindReq
- type NvmeRebindResp
- type PoolCreateReq
- type PoolCreateResp
- type PoolDeleteACLReq
- type PoolDeleteACLResp
- type PoolDestroyReq
- type PoolEvictReq
- type PoolExtendReq
- type PoolGetACLReq
- type PoolGetACLResp
- type PoolGetPropReq
- type PoolOverwriteACLReq
- type PoolOverwriteACLResp
- type PoolQueryErr
- type PoolQueryReq
- type PoolQueryResp
- type PoolQueryTargetReq
- type PoolQueryTargetResp
- type PoolRankResult
- type PoolRanksReq
- type PoolRanksResp
- func PoolDrain(ctx context.Context, rpcClient UnaryInvoker, req *PoolRanksReq) (*PoolRanksResp, error)
- func PoolExclude(ctx context.Context, rpcClient UnaryInvoker, req *PoolRanksReq) (*PoolRanksResp, error)
- func PoolReintegrate(ctx context.Context, rpcClient UnaryInvoker, req *PoolRanksReq) (*PoolRanksResp, error)
- type PoolSetPropReq
- type PoolUpdateACLReq
- type PoolUpdateACLResp
- type PoolUpgradeReq
- type PrimaryServiceRank
- type RanksReq
- type RanksResp
- func PrepShutdownRanks(ctx context.Context, rpcClient UnaryInvoker, req *RanksReq) (*RanksResp, error)
- func ResetFormatRanks(ctx context.Context, rpcClient UnaryInvoker, req *RanksReq) (*RanksResp, error)
- func StartRanks(ctx context.Context, rpcClient UnaryInvoker, req *RanksReq) (*RanksResp, error)
- func StopRanks(ctx context.Context, rpcClient UnaryInvoker, req *RanksReq) (*RanksResp, error)
- type SCMQueryResult
- type SCMUpdateResult
- type SetEngineLogMasksReq
- type SetEngineLogMasksResp
- type SmdInfo
- type SmdManageOpcode
- type SmdManageReq
- type SmdPool
- type SmdPoolMap
- type SmdQueryReq
- type SmdResp
- type StorageFormatReq
- type StorageFormatResp
- type StorageScanReq
- type StorageScanResp
- type SystemCheckDisableReq
- type SystemCheckEnableReq
- type SystemCheckFindingClass
- type SystemCheckFlags
- type SystemCheckGetPolicyReq
- type SystemCheckGetPolicyResp
- type SystemCheckPolicy
- type SystemCheckPoolInfo
- type SystemCheckQueryReq
- type SystemCheckQueryResp
- type SystemCheckRepairAction
- type SystemCheckRepairChoice
- type SystemCheckRepairReq
- type SystemCheckReport
- type SystemCheckScanPhase
- type SystemCheckSetPolicyReq
- type SystemCheckStartReq
- type SystemCheckStatus
- type SystemCheckStopReq
- type SystemCleanupReq
- type SystemCleanupResp
- type SystemDrainReq
- type SystemDrainResp
- type SystemEraseReq
- type SystemEraseResp
- type SystemExcludeReq
- type SystemExcludeResp
- type SystemGetAttrReq
- type SystemGetAttrResp
- type SystemGetPropReq
- type SystemGetPropResp
- type SystemJoinReq
- type SystemJoinResp
- type SystemQueryReq
- type SystemQueryResp
- type SystemSetAttrReq
- type SystemSetPropReq
- type SystemStartReq
- type SystemStartResp
- type SystemStopReq
- type SystemStopResp
- type UnaryInvoker
- type UnaryRequest
- type UnaryResponse
Constants ¶
const ( SystemCheckFlagDryRun = SystemCheckFlags(chkpb.CheckFlag_CF_DRYRUN) SystemCheckFlagReset = SystemCheckFlags(chkpb.CheckFlag_CF_RESET) SystemCheckFlagFailout = SystemCheckFlags(chkpb.CheckFlag_CF_FAILOUT) SystemCheckFlagAuto = SystemCheckFlags(chkpb.CheckFlag_CF_AUTO) SystemCheckFlagFindOrphans = SystemCheckFlags(chkpb.CheckFlag_CF_ORPHAN_POOL) SystemCheckFlagDisableFailout = SystemCheckFlags(chkpb.CheckFlag_CF_NO_FAILOUT) SystemCheckFlagDisableAuto = SystemCheckFlags(chkpb.CheckFlag_CF_NO_AUTO) )
const ( SystemCheckStatusInit = SystemCheckStatus(chkpb.CheckInstStatus_CIS_INIT) SystemCheckStatusRunning = SystemCheckStatus(chkpb.CheckInstStatus_CIS_RUNNING) SystemCheckStatusCompleted = SystemCheckStatus(chkpb.CheckInstStatus_CIS_COMPLETED) SystemCheckStatusStopped = SystemCheckStatus(chkpb.CheckInstStatus_CIS_STOPPED) SystemCheckStatusFailed = SystemCheckStatus(chkpb.CheckInstStatus_CIS_FAILED) SystemCheckStatusPaused = SystemCheckStatus(chkpb.CheckInstStatus_CIS_PAUSED) SystemCheckStatusImplicated = SystemCheckStatus(chkpb.CheckInstStatus_CIS_IMPLICATED) )
const ( SystemCheckScanPhasePrepare = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_PREPARE) SystemCheckScanPhasePoolList = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_POOL_LIST) SystemCheckScanPhasePoolMembership = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_POOL_MBS) SystemCheckScanPhasePoolCleanup = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_POOL_CLEANUP) SystemCheckScanPhaseContainerList = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_CONT_LIST) SystemCheckScanPhaseContainerCleanup = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_CONT_CLEANUP) SystemCheckScanPhaseDtxResync = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_DTX_RESYNC) SystemCheckScanPhaseObjectScrub = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_OBJ_SCRUB) SystemCheckScanPhaseObjectRebuild = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_REBUILD) SystemCheckScanPhaseAggregation = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_AGGREGATION) SystemCheckScanPhaseDone = SystemCheckScanPhase(chkpb.CheckScanPhase_CSP_DONE) )
const ( // PoolCreateTimeout defines the amount of time a pool create // request can take before being timed out. PoolCreateTimeout = 10 * time.Minute // be generous for large pools // DefaultPoolTimeout is the default timeout for a pool request. DefaultPoolTimeout = 5 * time.Minute )
const ( // SystemJoinTimeout defines the overall amount of time a system join attempt // can take. It should be an extremely generous value, in order to // accommodate (re)joins during leadership upheaval and other scenarios // that are expected to eventually resolve. SystemJoinTimeout = 1 * time.Hour // effectively "forever", just keep retrying // SystemJoinRetryTimeout defines the amount of time a retry attempt can take. It // should be set low in order to ensure that individual join attempts retry quickly. SystemJoinRetryTimeout = 10 * time.Second )
Variables ¶
var ( FaultUnknown = clientFault( code.ClientUnknown, "unknown client error", "", ) FaultConfigBadControlPort = clientFault( code.ClientConfigBadControlPort, "invalid control port in configuration", "specify a nonzero control port in configuration ('port' parameter) and retry the client application", ) FaultConfigEmptyHostList = clientFault( code.ClientConfigEmptyHostList, "empty hostlist parameter in configuration", "specify a non-empty list of DAOS server addresses in configuration ('hostlist' parameter) and retry the client application", ) FaultFormatRunningSystem = clientFault( code.ClientFormatRunningSystem, "storage format invoked on a running system", "stop and erase the system, then retry the format operation", ) FaultConfigVMDImbalance = clientFault( code.ClientConfigVMDImbalance, "different number of backing devices behind each engine's VMD addresses", "assign an equal number of NVMe SSDs to each VMD when configuring in BIOS", ) )
var ( // ErrNoConfigFile indicates that no configuration file was able // to be located. ErrNoConfigFile = errors.New("no configuration file found") )
Functions ¶
func ContSetOwner ¶
func ContSetOwner(ctx context.Context, rpcClient UnaryInvoker, req *ContSetOwnerReq) error
ContSetOwner changes the owner user and/or group of a DAOS container.
func DefaultEngineCfg ¶
DefaultEngineCfg is a standard baseline for the config generate to start from.
func FaultConnectionBadHost ¶
func FaultConnectionClosed ¶
func FaultConnectionNoRoute ¶
func FaultConnectionRefused ¶
func FaultConnectionTimedOut ¶
func FaultRpcTimeout ¶
func FormatACL ¶
func FormatACL(acl *AccessControlList, verbose bool) string
FormatACL converts the AccessControlList to a human-readable string.
func FormatACLDefault ¶
func FormatACLDefault(acl *AccessControlList) string
FormatACLDefault formats the AccessControlList in non-verbose mode.
func HTTPReqTimedOut ¶
HTTPReqTimedOut creates an error indicating that an HTTP request timed out.
func IsConfGenerateError ¶
IsConfGenerateError returns true if the provided error is a *ConfGenerateError.
func IsMSConnectionFailure ¶
IsMSConnectionFailure checks whether the error is an MS connection failure.
func IsRetryableConnErr ¶
IsRetryableConnErr indicates whether the error is a connection error that can be retried.
func MockBdevTier ¶
func MockBdevTier(numaID int, pciAddrIDs ...int) *storage.TierConfig
MockBdevTier creates a bdev TierConfig using supplied NUMA and PCI addresses.
func MockBdevTierWithRole ¶
func MockBdevTierWithRole(numaID, role int, pciAddrIDs ...int) *storage.TierConfig
MockBdevTierWithRole creates a bdev TierConfig with specific roles using supplied NUMA, roles and PCI addresses.
func MockEngineCfg ¶
MockEngineCfg creates an engine config using supplied NUMA and PCI addresses.
func MockEngineCfgTmpfs ¶
func MockEngineCfgTmpfs(numaID, ramdiskSize int, bdevTiers ...*storage.TierConfig) *engine.Config
MockEngineCfgTmpfs generates ramdisk engine config with pciAddrIDs defining bdev tier device lists.
func MockFailureMap ¶
MockFailureMap returns failure map from the given range of integers.
func MockHostSet ¶
MockHostSet builds a HostSet from a list of strings.
func MockPoolCreateResp ¶
func MockPoolCreateResp(t *testing.T, config *MockPoolRespConfig) *mgmtpb.PoolCreateResp
MockPoolCreateResp creates a PoolCreateResp using supplied MockPoolRespConfig.
func MockServerCfg ¶
MockServerCfg generates a server config from provided provider string and slice of engine configs.
func MockServerScanResp ¶
func MockServerScanResp(t *testing.T, variant string) *ctlpb.StorageScanResp
MockServerScanResp returns protobuf storage scan response with contents defined by the variant input string parameter.
func MockStorageScanResp ¶
func MockStorageScanResp(t *testing.T, mockScmConfigArray []MockScmConfig, mockNvmeConfigArray []MockNvmeConfig) *ctlpb.StorageScanResp
MockStorageScanResp builds a storage scan response from config array structs for SCM and NVMe.
func PoolDestroy ¶
func PoolDestroy(ctx context.Context, rpcClient UnaryInvoker, req *PoolDestroyReq) error
PoolDestroy performs a pool destroy operation on a DAOS Management Server instance.
func PoolEvict ¶
func PoolEvict(ctx context.Context, rpcClient UnaryInvoker, req *PoolEvictReq) error
PoolEvict performs a pool connection evict operation on a DAOS Management Server instance.
func PoolExtend ¶
func PoolExtend(ctx context.Context, rpcClient UnaryInvoker, req *PoolExtendReq) error
PoolExtend will extend the DAOS pool by the specified ranks. This should automatically start the rebalance process. Returns an error (including any DER code from DAOS).
func PoolGetProp ¶
func PoolGetProp(ctx context.Context, rpcClient UnaryInvoker, req *PoolGetPropReq) ([]*daos.PoolProperty, error)
PoolGetProp sends a pool get-prop request to the pool service leader.
func PoolSetProp ¶
func PoolSetProp(ctx context.Context, rpcClient UnaryInvoker, req *PoolSetPropReq) error
PoolSetProp sends a pool set-prop request to the pool service leader.
func PoolUpgrade ¶
func PoolUpgrade(ctx context.Context, rpcClient UnaryInvoker, req *PoolUpgradeReq) error
PoolUpgrade performs a pool upgrade operation on a DAOS Management Server instance.
func StartPProf ¶
func SystemCheckDisable ¶
func SystemCheckDisable(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckDisableReq) error
SystemCheckDisable disables the system checker.
func SystemCheckEnable ¶
func SystemCheckEnable(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckEnableReq) error
SystemCheckEnable enables the system checker.
func SystemCheckRepair ¶
func SystemCheckRepair(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckRepairReq) error
SystemCheckRepair sends a request to the system checker to indicate what the desired repair action is for a reported inconsistency.
func SystemCheckSetPolicy ¶
func SystemCheckSetPolicy(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckSetPolicyReq) error
SystemCheckSetPolicy sets the system checker properties.
func SystemCheckStart ¶
func SystemCheckStart(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckStartReq) error
SystemCheckStart starts the system checker.
func SystemCheckStop ¶
func SystemCheckStop(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckStopReq) error
SystemCheckStop stops the system checker.
func SystemConfigPath ¶
func SystemConfigPath() string
SystemConfigPath returns the computed path to the system control configuration file, if it exists.
func SystemSetAttr ¶
func SystemSetAttr(ctx context.Context, rpcClient UnaryInvoker, req *SystemSetAttrReq) error
SystemSetAttr sets system attributes.
func SystemSetProp ¶
func SystemSetProp(ctx context.Context, rpcClient UnaryInvoker, req *SystemSetPropReq) error
SystemSetProp sets system properties.
func UserConfigPath ¶
func UserConfigPath() string
UserConfigPath returns the computed path to a per-user control configuration file, if it exists.
Types ¶
type AccessControlList ¶
type AccessControlList struct { Entries []string `json:"entries"` // Access Control Entries in short string format Owner string `json:"owner_user"` // User that owns the resource OwnerGroup string `json:"owner_group"` // Group that owns the resource }
AccessControlList is a structure for the access control list.
func ParseACL ¶
func ParseACL(reader io.Reader) (*AccessControlList, error)
ParseACL reads the content from io.Reader and puts the results into a AccessControlList structure. Assumes that ACE strings are provided one per line.
func ReadACLFile ¶
func ReadACLFile(aclFile string) (*AccessControlList, error)
ReadACLFile reads in a file representing an ACL, and translates it into an AccessControlList structure
func (*AccessControlList) Empty ¶
func (acl *AccessControlList) Empty() bool
Empty checks whether there are any entries in the AccessControlList
func (*AccessControlList) HasOwner ¶
func (acl *AccessControlList) HasOwner() bool
HasOwner checks whether the AccessControlList has an owner user.
func (*AccessControlList) HasOwnerGroup ¶
func (acl *AccessControlList) HasOwnerGroup() bool
HasOwnerGroup checks whether the AccessControlList has an owner group.
func (*AccessControlList) String ¶
func (acl *AccessControlList) String() string
String displays the AccessControlList in a basic string format.
type BuildInfo ¶
type BuildInfo struct { Major uint32 `json:"major"` Minor uint32 `json:"minor"` Patch uint32 `json:"patch"` Tag string `json:"tag,omitempty"` }
func (*BuildInfo) VersionString ¶
type CleanupResult ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the Invoker interface and should be provided to API methods to invoke RPCs.
func DefaultClient ¶
func DefaultClient() *Client
DefaultClient returns an initialized Client with its parameters set to default values.
func NewClient ¶
func NewClient(opts ...ClientOption) *Client
NewClient returns an initialized Client with its parameters set by the provided ClientOption list.
func (*Client) GetComponent ¶
GetComponent returns the client's component.
func (*Client) GetSystem ¶
GetConfig retrieves the system name from the client configuration and implements the sysGetter interface.
func (*Client) InvokeUnaryRPC ¶
func (c *Client) InvokeUnaryRPC(ctx context.Context, req UnaryRequest) (*UnaryResponse, error)
InvokeUnaryRPC performs a synchronous (blocking) invocation of the request's RPC across all hosts in the request. The response contains a slice of HostResponse items which represent the success or failure of the RPC invocation for each host in the request.
func (*Client) InvokeUnaryRPCAsync ¶
func (c *Client) InvokeUnaryRPCAsync(parent context.Context, req UnaryRequest) (HostResponseChan, error)
InvokeUnaryRPCAsync performs an asynchronous invocation of the given RPC across all hosts in the request's host list. The returned HostResponseChan provides access to a stream of HostResponse items as they are received, and is closed when no more responses are expected.
type ClientNetworkHint ¶
type ClientNetworkHint struct { // These CaRT settings are shared with the // libdaos client to aid in CaRT initialization. Provider string `json:"provider"` Interface string `json:"interface"` Domain string `json:"domain"` CrtTimeout uint32 `json:"crt_timeout"` NetDevClass uint32 `json:"net_dev_class"` SrvSrxSet int32 `json:"srv_srx_set"` EnvVars []string `json:"env_vars"` ProviderIdx uint32 `json:"provider_idx"` }
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption defines the signature for functional Client options.
func WithClientComponent ¶
func WithClientComponent(comp build.Component) ClientOption
WithClientComponent sets the client's component.
func WithClientLogger ¶
func WithClientLogger(log debugLogger) ClientOption
WithClientLogger sets the client's debugLogger.
func WithConfig ¶
func WithConfig(cfg *Config) ClientOption
WithConfig sets the client's configuration.
type CollectLogReq ¶
type CollectLogReq struct { TargetFolder string AdminNode string ExtraLogsDir string JsonOutput bool LogFunction int32 LogCmd string LogStartDate string LogEndDate string LogStartTime string LogEndTime string StopOnError bool FileTransferExecArgs string // contains filtered or unexported fields }
CollectLogReq contains the parameters for a collect-log request.
type CollectLogResp ¶
type CollectLogResp struct {
HostErrorsResp
}
CollectLogResp contains the results of a collect-log
func CollectLog ¶
func CollectLog(ctx context.Context, rpcClient UnaryInvoker, req *CollectLogReq) (*CollectLogResp, error)
CollectLog concurrently performs log collection across all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all host log collection operations.
type ConfGenerateError ¶
type ConfGenerateError struct {
HostErrorsResp
}
ConfGenerateError implements the error interface and contains a set of host-specific errors encountered while attempting to generate a configuration.
func (*ConfGenerateError) Error ¶
func (cge *ConfGenerateError) Error() string
func (*ConfGenerateError) GetHostErrors ¶
func (cge *ConfGenerateError) GetHostErrors() HostErrorsMap
GetHostErrors returns the wrapped HostErrorsMap.
type ConfGenerateRemoteReq ¶
type ConfGenerateRemoteReq struct { ConfGenerateReq HostList []string Client UnaryInvoker }
ConfGenerateRemoteReq adds connectivity related fields to base request.
type ConfGenerateRemoteResp ¶
type ConfGenerateRemoteResp struct {
ConfGenerateResp
}
ConfGenerateRemoteResp wraps the ConfGenerateResp.
func ConfGenerateRemote ¶
func ConfGenerateRemote(ctx context.Context, req ConfGenerateRemoteReq) (*ConfGenerateRemoteResp, error)
ConfGenerateRemote calls ConfGenerate after validating a homogeneous hardware setup across remote hosts. Returns API response or error.
type ConfGenerateReq ¶
type ConfGenerateReq struct { // Number of engines to include in generated config. NrEngines int `json:"NrEngines"` // Force use of a specific network device class for fabric comms. NetClass hardware.NetDevClass `json:"-"` // Force use of a specific fabric provider. NetProvider string `json:"NetProvider"` // Generate a config without NVMe. SCMOnly bool `json:"SCMOnly"` // Hosts to run the management service. MgmtSvcReplicas []string `json:"-"` // Ports to use for fabric comms (one needed per engine). FabricPorts []int `json:"-"` // Generate config with a tmpfs RAM-disk SCM. UseTmpfsSCM bool `json:"UseTmpfsSCM"` // Location to persist control-plane metadata, will generate MD-on-SSD config. ExtMetadataPath string `json:"ExtMetadataPath"` Log logging.Logger `json:"-"` }
ConGenerateReq contains the inputs for the request.
func (*ConfGenerateReq) UnmarshalJSON ¶
func (cgr *ConfGenerateReq) UnmarshalJSON(data []byte) error
UnmarshalJSON unpacks JSON message into ConfGenerateReq struct.
type ConfGenerateResp ¶
ConfGenerateResp contains the generated server config.
func ConfGenerate ¶
func ConfGenerate(req ConfGenerateReq, newEngineCfg newEngineCfgFn, hf *HostFabric, hs *HostStorage) (*ConfGenerateResp, error)
ConfGenerate derives an optimal server config file from details of network, storage and CPU hardware by evaluating affinity matches for NUMA node combinations.
type Config ¶
type Config struct { SystemName string `yaml:"name"` ControlPort int `yaml:"port"` HostList []string `yaml:"hostlist"` TransportConfig *security.TransportConfig `yaml:"transport_config"` Path string `yaml:"-"` }
Config defines the parameters used to connect to a control API server.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a Config populated with default values. Only suitable for single-node configurations.
func LoadConfig ¶
LoadConfig attempts to load a configuration by one of the following: 1. If the supplied path is a non-empty string, use it. Otherwise, 2. Try to load the config from the current user's home directory. 3. Finally, try to load the config from the system location.
type ContSetOwnerReq ¶
type ContSetOwnerReq struct { ContID string // Container UUID or label PoolID string // UUID or label of the pool for the container User string // User to own the container, or empty if none Group string // Group to own the container, or empty if none // contains filtered or unexported fields }
ContSetOwnerReq contains the parameters for the set owner request
type DeviceType ¶
type DeviceType uint32
DeviceType is an enum representing the storage device type.
const ( // DeviceTypeUnknown represents an unspecified device type. DeviceTypeUnknown DeviceType = iota // DeviceTypeSCM represents SCM modules. DeviceTypeSCM // DeviceTypeNVMe represents NVMe SSDs. DeviceTypeNVMe )
type EventForwarder ¶
type EventForwarder struct {
// contains filtered or unexported fields
}
EventForwarder implements the events.Handler interface, increments sequence number for each event forwarded and distributes requests to MS replicas.
func NewEventForwarder ¶
func NewEventForwarder(rpcClient UnaryInvoker, replicas []string) *EventForwarder
NewEventForwarder returns an initialized EventForwarder.
type EventLogger ¶
type EventLogger struct {
// contains filtered or unexported fields
}
EventLogger implements the events.Handler interface and logs RAS event to INFO using supplied logging.Logger. In addition syslog is written to at the priority level derived from the event severity.
func NewEventLogger ¶
func NewEventLogger(log logging.Logger) *EventLogger
NewEventLogger returns an initialized EventLogger capable of writing to the supplied logger in addition to syslog.
type EventNotifyReq ¶
type EventNotifyReq struct {
// contains filtered or unexported fields
}
EventNotifyReq contains the inputs for an event notify request.
type EventNotifyResp ¶
type EventNotifyResp struct{}
EventNotifyResp contains the inputs for an event notify response.
type FirmwareQueryReq ¶
type FirmwareQueryReq struct { SCM bool // Query SCM devices NVMe bool // Query NVMe devices Devices []string // Specific devices to query ModelID string // Filter by model ID FirmwareRev string // Filter by current FW revision // contains filtered or unexported fields }
FirmwareQueryReq is a request for firmware information for storage devices.
type FirmwareQueryResp ¶
type FirmwareQueryResp struct { HostErrorsResp HostSCMFirmware HostSCMQueryMap HostNVMeFirmware HostNVMeQueryMap }
FirmwareQueryResp returns storage device firmware information.
func FirmwareQuery ¶
func FirmwareQuery(ctx context.Context, rpcClient UnaryInvoker, req *FirmwareQueryReq) (*FirmwareQueryResp, error)
FirmwareQuery concurrently requests device firmware information from all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all host firmware query operations.
type FirmwareUpdateReq ¶
type FirmwareUpdateReq struct { FirmwarePath string Type DeviceType Devices []string // Specific devices to update ModelID string // Update only devices of specific model FirmwareRev string // Update only devices with a specific current firmware // contains filtered or unexported fields }
FirmwareUpdateReq is a request to update firmware for a specific type of storage device.
type FirmwareUpdateResp ¶
type FirmwareUpdateResp struct { HostErrorsResp HostSCMResult HostSCMUpdateMap HostNVMeResult HostNVMeUpdateMap }
FirmwareUpdateResp returns the results of firmware update operations.
func FirmwareUpdate ¶
func FirmwareUpdate(ctx context.Context, rpcClient UnaryInvoker, req *FirmwareUpdateReq) (*FirmwareUpdateResp, error)
FirmwareUpdate concurrently updates device firmware for a given device type for all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all host firmware update operations.
type GetAttachInfoReq ¶
type GetAttachInfoReq struct { System string AllRanks bool // contains filtered or unexported fields }
GetAttachInfoReq defines the request parameters for GetAttachInfo.
func (*GetAttachInfoReq) SetMaxTries ¶
func (r *GetAttachInfoReq) SetMaxTries(mt uint)
SetMaxTries sets the maximum number of request attempts.
type GetAttachInfoResp ¶
type GetAttachInfoResp struct { System string `json:"sys"` ServiceRanks []*PrimaryServiceRank `json:"rank_uris"` AlternateServiceRanks []*PrimaryServiceRank `json:"secondary_rank_uris"` MSRanks []uint32 `json:"ms_ranks"` ClientNetHint ClientNetworkHint `json:"client_net_hint"` AlternateClientNetHints []ClientNetworkHint `json:"secondary_client_net_hints"` BuildInfo BuildInfo `json:"build_info"` }
func GetAttachInfo ¶
func GetAttachInfo(ctx context.Context, rpcClient UnaryInvoker, req *GetAttachInfoReq) (*GetAttachInfoResp, error)
GetAttachInfo makes a request to the current MS leader in order to learn the PSRs (rank/uri mapping) for the DAOS cluster. This information is used by DAOS clients in order to make connections to DAOS servers over the storage fabric.
func (*GetAttachInfoResp) String ¶
func (gair *GetAttachInfoResp) String() string
type HostErrorSet ¶
HostErrorSet preserves the original hostError used to create the map key.
type HostErrorsMap ¶
type HostErrorsMap map[string]*HostErrorSet
HostErrorsMap provides a mapping from error strings to a set of hosts to which the error applies.
func (HostErrorsMap) Add ¶
func (hem HostErrorsMap) Add(hostAddr string, hostErr error) (err error)
Add creates or updates the err/addr keyval pair.
func (HostErrorsMap) ErrorCount ¶
func (hem HostErrorsMap) ErrorCount() (nrErrs int)
ErrorCount returns a count of errors in map.
func (HostErrorsMap) Keys ¶
func (hem HostErrorsMap) Keys() []string
Keys returns a stable sorted slice of the errors map keys.
func (HostErrorsMap) MarshalJSON ¶
func (hem HostErrorsMap) MarshalJSON() ([]byte, error)
MarshalJSON implements a custom marshaller to include the hostset as a ranged string.
type HostErrorsResp ¶
type HostErrorsResp struct {
HostErrors HostErrorsMap `json:"host_errors"`
}
HostErrorsResp is a response type containing a HostErrorsMap.
func MockHostErrorsResp ¶
func MockHostErrorsResp(t *testing.T, hostErrors ...*MockHostError) HostErrorsResp
MockHostErrorsResp returns HostErrorsResp when provided with MockHostErrors from different hostsets.
func (*HostErrorsResp) Errors ¶
func (her *HostErrorsResp) Errors() error
Errors returns an error containing brief description of errors in map.
func (*HostErrorsResp) GetHostErrors ¶
func (her *HostErrorsResp) GetHostErrors() HostErrorsMap
GetHostErrors retrieves a HostErrorsMap from a response type.
type HostFabric ¶
type HostFabric struct { Interfaces []*HostFabricInterface `hash:"set"` Providers []string `hash:"set"` NumaCount uint32 CoresPerNuma uint32 }
HostFabric describes a host fabric configuration.
func (*HostFabric) AddInterface ¶
func (hf *HostFabric) AddInterface(hfi *HostFabricInterface)
AddInterface is a helper function that populates a HostFabric.
func (*HostFabric) HashKey ¶
func (hf *HostFabric) HashKey() (uint64, error)
HashKey returns a uint64 value suitable for use as a key into a map of HostFabric configurations.
type HostFabricInterface ¶
type HostFabricInterface struct { Provider string Device string NumaNode uint32 Priority uint32 NetDevClass hardware.NetDevClass }
HostFabricInterface describes a host fabric interface.
func (*HostFabricInterface) String ¶
func (hfi *HostFabricInterface) String() string
type HostFabricMap ¶
type HostFabricMap map[uint64]*HostFabricSet
HostFabricMap provides a map of HostFabric keys to HostFabricSet values.
func MockHostFabricMap ¶
func MockHostFabricMap(t *testing.T, scans ...*MockFabricScan) HostFabricMap
MockHostFabricMap generates a HostFabricMap from MockFabricScan structs.
func (HostFabricMap) Add ¶
func (hfm HostFabricMap) Add(hostAddr string, hf *HostFabric) (err error)
Add inserts the given host address to a matching HostFabricSet or creates a new one.
func (HostFabricMap) Keys ¶
func (hfm HostFabricMap) Keys() []uint64
Keys returns a set of storage map keys sorted by hosts.
type HostFabricSet ¶
type HostFabricSet struct { HostFabric *HostFabric HostSet *hostlist.HostSet }
HostFabricSet contains a HostFabric configuration and the set of hosts matching this configuration.
func NewHostFabricSet ¶
func NewHostFabricSet(hostAddr string, hf *HostFabric) (*HostFabricSet, error)
NewHostFabricSet returns an initialized HostFabricSet for the given host address and HostFabric configuration.
type HostNVMeQueryMap ¶
type HostNVMeQueryMap map[string][]*NVMeQueryResult
HostNVMeQueryMap maps a host name to a slice of NVMe firmware query results.
func (HostNVMeQueryMap) Keys ¶
func (m HostNVMeQueryMap) Keys() []string
Keys returns the sorted list of keys from the HostNVMeQueryMap.
type HostNVMeUpdateMap ¶
type HostNVMeUpdateMap map[string][]*NVMeUpdateResult
HostNVMeUpdateMap maps a host name to a slice of NVMe update results.
func (HostNVMeUpdateMap) Keys ¶
func (m HostNVMeUpdateMap) Keys() []string
Keys returns the sorted list of keys from the NVMe result map.
type HostResponse ¶
HostResponse contains a single host's response to an unary RPC, or an error if the host was unable to respond successfully.
func MockHostResponses ¶
func MockHostResponses(t *testing.T, count int, fmtStr string, respMsg proto.Message) []*HostResponse
MockHostResponses returns mock host responses.
type HostResponseChan ¶
type HostResponseChan chan *HostResponse
HostResponseChan defines a channel of *HostResponse items returned from asynchronous unary RPC invokers.
type HostResponseReportFn ¶
type HostResponseReportFn func(*HostResponse)
HostResponseReport defines the function signature for a callback invoked when a host response is received.
type HostSCMQueryMap ¶
type HostSCMQueryMap map[string][]*SCMQueryResult
HostSCMQueryMap maps a host name to a slice of SCM firmware query results.
func (HostSCMQueryMap) Keys ¶
func (m HostSCMQueryMap) Keys() []string
Keys returns the sorted list of keys from the HostSCMQueryMap.
type HostSCMUpdateMap ¶
type HostSCMUpdateMap map[string][]*SCMUpdateResult
HostSCMUpdateMap maps a host name to a slice of SCM update results.
func (HostSCMUpdateMap) Keys ¶
func (m HostSCMUpdateMap) Keys() []string
Keys returns the sorted list of keys from the SCM result map.
type HostStorage ¶
type HostStorage struct { // NvmeDevices contains the set of NVMe controllers (SSDs) // in this configuration. NvmeDevices storage.NvmeControllers `json:"nvme_devices"` // ScmModules contains the set of SCM modules (persistent // memory DIMMs) in this configuration. ScmModules storage.ScmModules `json:"scm_modules"` // ScmNamespaces contains the set of prepared SCM namespaces // (block devices) in this configuration. ScmNamespaces storage.ScmNamespaces `json:"scm_namespaces"` // ScmMountPoints contains the set of SCM mountpoints in // this configuration. ScmMountPoints storage.ScmMountPoints `json:"scm_mount_points"` // SmdInfo contains information obtained by querying the // host's metadata table, if available. SmdInfo *SmdInfo `json:"smd_info"` // RebootRequired indicates that a host reboot is necessary in order // to achieve some goal (SCM prep, etc.) RebootRequired bool `json:"reboot_required"` // MemInfo contains information about the host's hugepages. MemInfo *common.MemInfo `json:"mem_info"` }
HostStorage describes a host storage configuration which may apply to one or more hosts.
func (*HostStorage) HashKey ¶
func (hs *HostStorage) HashKey() (uint64, error)
HashKey returns a uint64 value suitable for use as a key into a map of HostStorage configurations.
type HostStorageMap ¶
type HostStorageMap map[uint64]*HostStorageSet
HostStorageMap provides a map of HostStorage keys to HostStorageSet values.
func MockHostStorageMap ¶
func MockHostStorageMap(t *testing.T, scans ...*MockStorageScan) HostStorageMap
MockHostStorageMap returns HostStorageMap when provided with mock storage scan results from different hostsets.
func (HostStorageMap) Add ¶
func (hsm HostStorageMap) Add(hostAddr string, hs *HostStorage) (err error)
Add inserts the given host address to a matching HostStorageSet or creates a new one.
func (HostStorageMap) HostCount ¶
func (hsm HostStorageMap) HostCount() (nrHosts int)
HostCount returns a count of hosts in map.
func (HostStorageMap) IsMdOnSsdEnabled ¶
func (hsm HostStorageMap) IsMdOnSsdEnabled() bool
IsMdOnSsdEnabled returns true when bdev MD-on-SSD roles have been set on a NVMe SSD within a HostStorageMap's host storage set's NvmeDevices. Assumes that no roles exist if mode is PMem.
func (HostStorageMap) Keys ¶
func (hsm HostStorageMap) Keys() []uint64
Keys returns a set of storage map keys sorted by hosts.
func (HostStorageMap) String ¶
func (hsm HostStorageMap) String() string
type HostStorageSet ¶
type HostStorageSet struct { HostStorage *HostStorage `json:"storage"` HostSet *hostlist.HostSet `json:"hosts"` }
HostStorageSet contains a HostStorage configuration and the set of hosts matching this configuration.
func NewHostStorageSet ¶
func NewHostStorageSet(hostAddr string, hs *HostStorage) (*HostStorageSet, error)
NewHostStorageSet returns an initialized HostStorageSet for the given host address and HostStorage configuration.
func (*HostStorageSet) Len ¶
func (hss *HostStorageSet) Len() int
Len returns the number of hosts in set with this host storage.
func (*HostStorageSet) String ¶
func (hss *HostStorageSet) String() string
type Invoker ¶
type Invoker interface { UnaryInvoker //TODO: StreamInvoker SetConfig(*Config) }
Invoker defines an interface to be implemented by clients capable of invoking unary or stream RPCs.
type LeaderQueryReq ¶
type LeaderQueryReq struct {
// contains filtered or unexported fields
}
LeaderQueryReq contains the inputs for the leader query request.
type LeaderQueryResp ¶
type LeaderQueryResp struct { Leader string `json:"current_leader"` Replicas []string `json:"replicas"` DownReplicas []string `json:"down_replicas"` }
LeaderQueryResp contains the status of the request and, if successful, the MS leader and set of replicas in the system.
func LeaderQuery ¶
func LeaderQuery(ctx context.Context, rpcClient UnaryInvoker, req *LeaderQueryReq) (*LeaderQueryResp, error)
LeaderQuery requests the current Management Service leader and the set of MS replicas.
type ListPoolsReq ¶
type ListPoolsReq struct { NoQuery bool // contains filtered or unexported fields }
ListPoolsReq contains the inputs for the list pools command.
type ListPoolsResp ¶
type ListPoolsResp struct { Status int32 `json:"status"` Pools []*daos.PoolInfo `json:"pools"` QueryErrors map[uuid.UUID]*PoolQueryErr `json:"-"` // NB: Exported because of tests in other packages. }
ListPoolsResp contains the status of the request and, if successful, the list of pools in the system.
func ListPools ¶
func ListPools(ctx context.Context, rpcClient UnaryInvoker, req *ListPoolsReq) (*ListPoolsResp, error)
ListPools fetches the list of all pools and their service replicas from the system.
func (*ListPoolsResp) Errors ¶
func (lpr *ListPoolsResp) Errors() error
Errors returns summary of response errors including pool query failures.
func (*ListPoolsResp) PoolQueryError ¶
func (lpr *ListPoolsResp) PoolQueryError(poolUUID uuid.UUID) error
PoolQueryError returns the error if PoolQuery failed for the given pool.
func (*ListPoolsResp) Validate ¶
func (lpr *ListPoolsResp) Validate() (string, error)
Validate returns error if response contents are unexpected, string of warnings if pool queries have failed or nil values if contents are expected.
type MetricsListReq ¶
type MetricsListReq struct { Host string // Host to query for telemetry data Port uint32 // Port to use for collecting telemetry data // contains filtered or unexported fields }
MetricsListReq is used to request the list of metrics.
type MetricsListResp ¶
type MetricsListResp struct {
AvailableMetricSets []*daos.MetricSet `json:"available_metric_sets"`
}
MetricsListResp contains the list of available metrics.
func MetricsList ¶
func MetricsList(ctx context.Context, req *MetricsListReq) (*MetricsListResp, error)
MetricsList fetches the list of available metric types from the DAOS nodes.
type MetricsQueryReq ¶
type MetricsQueryReq struct { Host string // host to query for telemetry data Port uint32 // port to use for collecting telemetry data MetricNames []string // if empty, collects all metrics // contains filtered or unexported fields }
MetricsQueryReq is used to query telemetry values.
type MetricsQueryResp ¶
MetricsQueryResp contains the list of telemetry values per host.
func MetricsQuery ¶
func MetricsQuery(ctx context.Context, req *MetricsQueryReq) (*MetricsQueryResp, error)
MetricsQuery fetches the requested metrics values from the DAOS nodes.
type MockFabricScan ¶
type MockFabricScan struct { Hosts string Fabric *HostFabric }
MockFabricScan is used to generate HostFabricMap from mock scan results.
type MockFormatConf ¶
type MockFormatConf struct { Hosts int ScmPerHost int NvmePerHost int ScmFailures map[int]struct{} NvmeFailures map[int]struct{} NvmeRoleBits int }
MockFormatConf configures the contents of a StorageFormatResp.
type MockHostError ¶
MockHostError represents an error received from multiple hosts.
type MockHostStorageConfig ¶
type MockHostStorageConfig struct { HostName string ScmConfig []MockScmConfig NvmeConfig []MockNvmeConfig }
type MockInvoker ¶
type MockInvoker struct {
// contains filtered or unexported fields
}
MockInvoker implements the Invoker interface in order to enable unit testing of API functions.
func DefaultMockInvoker ¶
func DefaultMockInvoker(log debugLogger) *MockInvoker
DefaultMockInvoker returns a MockInvoker that uses the default configuration.
func NewMockInvoker ¶
func NewMockInvoker(log debugLogger, cfg *MockInvokerConfig) *MockInvoker
NewMockInvoker returns a configured MockInvoker. If a nil config is supplied, the default config is used.
func (*MockInvoker) Debug ¶
func (mi *MockInvoker) Debug(msg string)
func (*MockInvoker) Debugf ¶
func (mi *MockInvoker) Debugf(fmtStr string, args ...interface{})
func (*MockInvoker) GetComponent ¶
func (mi *MockInvoker) GetComponent() build.Component
func (*MockInvoker) GetInvokeCount ¶
func (mi *MockInvoker) GetInvokeCount() int
func (*MockInvoker) GetSystem ¶
func (mi *MockInvoker) GetSystem() string
func (*MockInvoker) InvokeUnaryRPC ¶
func (mi *MockInvoker) InvokeUnaryRPC(ctx context.Context, uReq UnaryRequest) (*UnaryResponse, error)
func (*MockInvoker) InvokeUnaryRPCAsync ¶
func (mi *MockInvoker) InvokeUnaryRPCAsync(ctx context.Context, uReq UnaryRequest) (HostResponseChan, error)
func (*MockInvoker) SetConfig ¶
func (mi *MockInvoker) SetConfig(_ *Config)
type MockInvokerConfig ¶
type MockInvokerConfig struct { Sys string Component build.Component UnaryError error UnaryResponse *UnaryResponse UnaryResponseSet []*UnaryResponse UnaryResponseDelays [][]time.Duration HostResponses HostResponseChan ReqTimeout time.Duration RetryTimeout time.Duration }
MockInvokerConfig defines the configured responses for a MockInvoker.
func DefaultMockInvokerConfig ¶
func DefaultMockInvokerConfig() *MockInvokerConfig
DefaultMockInvokerConfig returns the default MockInvoker configuration.
type MockMessage ¶
type MockMessage struct{}
MockMessage implements the proto.Message interface, and can be used for test mocks.
func (*MockMessage) ProtoMessage ¶
func (mm *MockMessage) ProtoMessage()
func (*MockMessage) ProtoReflect ¶
func (mm *MockMessage) ProtoReflect() protoreflect.Message
func (*MockMessage) Reset ¶
func (mm *MockMessage) Reset()
func (*MockMessage) String ¶
func (mm *MockMessage) String() string
type MockNvmeConfig ¶
type MockNvmeConfig struct { MockStorageConfig Rank ranklist.Rank }
type MockPoolRespConfig ¶
MockPoolRespConfig is used to create a pool response with MockPoolCreateResp.
type MockScmConfig ¶
type MockScmConfig struct { MockStorageConfig Rank ranklist.Rank }
type MockStorageConfig ¶
type MockStorageScan ¶
type MockStorageScan struct { Hosts string HostScan *ctlpb.StorageScanResp }
MockStorageScan represents results from scan on multiple hosts.
type NVMeQueryResult ¶
type NVMeQueryResult struct {
Device storage.NvmeController
}
NVMeQueryResult represents the results of a firmware query for a single NVMe device.
type NVMeUpdateResult ¶
NVMeUpdateResult represents the results of a firmware update for a single NVMe device.
type NetworkScanReq ¶
type NetworkScanReq struct { Provider string // contains filtered or unexported fields }
NetworkScanReq contains the parameters for a network scan request.
type NetworkScanResp ¶
type NetworkScanResp struct { HostErrorsResp HostFabrics HostFabricMap }
NetworkScanResp contains the results of a network scan.
func NetworkScan ¶
func NetworkScan(ctx context.Context, rpcClient UnaryInvoker, req *NetworkScanReq) (*NetworkScanResp, error)
NetworkScan concurrently performs network scans across all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all host scan operations.
type NvmeAddDeviceReq ¶
type NvmeAddDeviceReq struct { PCIAddr string `json:"pci_addr"` EngineIndex uint32 `json:"engine_index"` StorageTierIndex int32 `json:"storage_tier_index"` // contains filtered or unexported fields }
NvmeAddDeviceReq contains the parameters for a storage nvme-add-device request.
If StorageTierIndex is set to -1, this indicates that the server should add the device to the first configured bdev tier.
func (*NvmeAddDeviceReq) WithStorageTierIndex ¶
func (req *NvmeAddDeviceReq) WithStorageTierIndex(i int32) *NvmeAddDeviceReq
WithStorageTierIndex updates request storage tier index value and returns reference.
type NvmeAddDeviceResp ¶
type NvmeAddDeviceResp struct {
HostErrorsResp
}
NvmeAddDeviceResp contains the response from a storage nvme-add-device request.
func StorageNvmeAddDevice ¶
func StorageNvmeAddDevice(ctx context.Context, rpcClient UnaryInvoker, req *NvmeAddDeviceReq) (*NvmeAddDeviceResp, error)
StorageNvmeAddDevice adds NVMe SSD transport address to an engine configuration.
type NvmeRebindReq ¶
type NvmeRebindReq struct { PCIAddr string `json:"pci_addr"` // contains filtered or unexported fields }
NvmeRebindReq contains the parameters for a storage nvme-rebind request.
type NvmeRebindResp ¶
type NvmeRebindResp struct {
HostErrorsResp
}
NvmeRebindResp contains the response from a storage nvme-rebind request.
func StorageNvmeRebind ¶
func StorageNvmeRebind(ctx context.Context, rpcClient UnaryInvoker, req *NvmeRebindReq) (*NvmeRebindResp, error)
StorageNvmeRebind rebinds NVMe SSD from kernel driver and binds to user-space driver on single server.
type PoolCreateReq ¶
type PoolCreateReq struct { UUID uuid.UUID `json:"uuid,omitempty"` // Optional UUID; auto-generate if not supplied User string `json:"user"` UserGroup string `json:"user_group"` ACL *AccessControlList `json:"-"` NumSvcReps uint32 `json:"num_svc_reps"` Properties []*daos.PoolProperty `json:"-"` TotalBytes uint64 `json:"total_bytes"` // Auto-sizing param TierRatio []float64 `json:"tier_ratio"` // Auto-sizing param NumRanks uint32 `json:"num_ranks"` // Auto-sizing param Ranks []ranklist.Rank `json:"ranks"` // Manual-sizing param TierBytes []uint64 `json:"tier_bytes"` // Per-rank values MemRatio float32 `json:"mem_ratio"` // mem_file_size:meta_blob_size // contains filtered or unexported fields }
PoolCreateReq contains the parameters for a pool create request.
func (*PoolCreateReq) MarshalJSON ¶
func (pcr *PoolCreateReq) MarshalJSON() ([]byte, error)
type PoolCreateResp ¶
type PoolCreateResp struct { UUID string `json:"uuid"` Leader uint32 `json:"svc_ldr"` SvcReps []uint32 `json:"svc_reps"` TgtRanks []uint32 `json:"tgt_ranks"` TierBytes []uint64 `json:"tier_bytes"` // Per-rank storage tier sizes. MemFileBytes uint64 `json:"mem_file_bytes"` // Per-rank. MD-on-SSD mode only. MdOnSsdActive bool `json:"md_on_ssd_active"` // MD-on-SSD mode. }
PoolCreateResp contains the response from a pool create request.
func PoolCreate ¶
func PoolCreate(ctx context.Context, rpcClient UnaryInvoker, req *PoolCreateReq) (*PoolCreateResp, error)
PoolCreate performs a pool create operation on a DAOS Management Server instance. Default values for missing request parameters (e.g. owner/group) are generated when appropriate.
type PoolDeleteACLReq ¶
type PoolDeleteACLReq struct { ID string // UUID or label of the pool Principal string // Principal whose entry will be removed // contains filtered or unexported fields }
PoolDeleteACLReq contains the input parameters for PoolDeleteACL.
type PoolDeleteACLResp ¶
type PoolDeleteACLResp struct {
ACL *AccessControlList // actual ACL of the pool
}
PoolDeleteACLResp returns the updated ACL for the pool.
func PoolDeleteACL ¶
func PoolDeleteACL(ctx context.Context, rpcClient UnaryInvoker, req *PoolDeleteACLReq) (*PoolDeleteACLResp, error)
PoolDeleteACL sends a request to delete an entry in a pool's Access Control List. If it succeeds, it returns the updated ACL. If it fails, it returns an error.
type PoolDestroyReq ¶
type PoolDestroyReq struct { ID string Recursive bool // Remove pool and any child containers. Force bool // contains filtered or unexported fields }
PoolDestroyReq contains the parameters for a pool destroy request.
type PoolEvictReq ¶
PoolEvictReq contains the parameters for a pool evict request.
type PoolExtendReq ¶
type PoolExtendReq struct { ID string Ranks []ranklist.Rank // contains filtered or unexported fields }
PoolExtendReq struct contains request
type PoolGetACLReq ¶
type PoolGetACLReq struct { ID string // pool ID // contains filtered or unexported fields }
PoolGetACLReq contains the input parameters for PoolGetACL
type PoolGetACLResp ¶
type PoolGetACLResp struct {
ACL *AccessControlList
}
PoolGetACLResp contains the output results for PoolGetACL
func PoolGetACL ¶
func PoolGetACL(ctx context.Context, rpcClient UnaryInvoker, req *PoolGetACLReq) (*PoolGetACLResp, error)
PoolGetACL gets the Access Control List for the pool.
type PoolGetPropReq ¶
type PoolGetPropReq struct { // ID identifies the pool for which this property should be set. ID string // Name is always a string representation of the pool property. // It will be resolved into the C representation prior to being // forwarded over dRPC. If not set, all properties will be returned. Name string // Properties is the list of properties to be retrieved. If empty, // all properties will be retrieved. Properties []*daos.PoolProperty // contains filtered or unexported fields }
PoolGetPropReq contains pool get-prop parameters.
type PoolOverwriteACLReq ¶
type PoolOverwriteACLReq struct { ID string // pool UUID or label ACL *AccessControlList // new ACL for the pool // contains filtered or unexported fields }
PoolOverwriteACLReq contains the input parameters for PoolOverwriteACL
type PoolOverwriteACLResp ¶
type PoolOverwriteACLResp struct {
ACL *AccessControlList // actual ACL of the pool
}
PoolOverwriteACLResp returns the updated ACL for the pool
func PoolOverwriteACL ¶
func PoolOverwriteACL(ctx context.Context, rpcClient UnaryInvoker, req *PoolOverwriteACLReq) (*PoolOverwriteACLResp, error)
PoolOverwriteACL sends a request to replace the pool's old Access Control List with a new one. If it succeeds, it returns the updated ACL. If not, it returns an error.
type PoolQueryErr ¶
PoolQueryErr contains the error if a pool query failed.
type PoolQueryReq ¶
type PoolQueryReq struct { ID string QueryMask daos.PoolQueryMask // contains filtered or unexported fields }
PoolQueryReq contains the parameters for a pool query request.
type PoolQueryResp ¶
PoolQueryResp contains the pool query response.
func PoolQuery ¶
func PoolQuery(ctx context.Context, rpcClient UnaryInvoker, req *PoolQueryReq) (*PoolQueryResp, error)
PoolQuery performs a pool query operation for the specified pool ID on a DAOS Management Server instance.
func (*PoolQueryResp) MarshalJSON ¶
func (pqr *PoolQueryResp) MarshalJSON() ([]byte, error)
func (*PoolQueryResp) UpdateState ¶
func (pqr *PoolQueryResp) UpdateState() error
UpdateState updates the pool state based on response field values.
type PoolQueryTargetReq ¶
type PoolQueryTargetReq struct { ID string Rank ranklist.Rank Targets []uint32 // contains filtered or unexported fields }
PoolQueryTargetReq contains parameters for a pool query target request
type PoolQueryTargetResp ¶
type PoolQueryTargetResp struct { Status int32 `json:"status"` Infos []*daos.PoolQueryTargetInfo }
PoolQueryTargetResp contains a pool query target response
func PoolQueryTargets ¶
func PoolQueryTargets(ctx context.Context, rpcClient UnaryInvoker, req *PoolQueryTargetReq) (*PoolQueryTargetResp, error)
PoolQueryTargets performs a pool query targets operation on a DAOS Management Server instance, for the specified pool ID, pool engine rank, and target indices.
type PoolRankResult ¶
type PoolRankResult struct { Rank ranklist.Rank `json:"rank"` Errored bool `json:"errored"` Msg string `json:"msg"` }
PoolRankResult describes the result of an operation on a pool's rank. JSON compatible with shared RankResult protobuf message.
type PoolRanksReq ¶
type PoolRanksReq struct { ID string `json:"id"` Ranks []ranklist.Rank `json:"ranks"` TargetIdx []uint32 `json:"target_idx"` Force bool `json:"force"` // contains filtered or unexported fields }
PoolRanksReq struct contains request for operation on multiple pool-ranks. Control API receives generic PoolRanksReq with multiple ranks from API consumer (e.g. dmg admin tool) and issues specific e.g. pb.PoolDrain gRPC requests to server for each rank in serial using the management service client API. Per-rank results are returned in control API generic PoolRanksResp.
type PoolRanksResp ¶
type PoolRanksResp struct { ID string `json:"id"` Results []*PoolRankResult `json:"results"` }
PoolRanksResp struct contains response from operation on multiple pool-ranks.
func PoolDrain ¶
func PoolDrain(ctx context.Context, rpcClient UnaryInvoker, req *PoolRanksReq) (*PoolRanksResp, error)
PoolDrain will set pool targets on specified ranks in to the drain state which should automatically start the rebuildiing process. Returns pool-ranks response and error. Drain engages a cooperative transfer of data before rank gets excluded.
func PoolExclude ¶
func PoolExclude(ctx context.Context, rpcClient UnaryInvoker, req *PoolRanksReq) (*PoolRanksResp, error)
PoolExclude will set pool targets on specified ranks to down state which should automatically start the rebuilding process. Returns pool-ranks response and error.
func PoolReintegrate ¶
func PoolReintegrate(ctx context.Context, rpcClient UnaryInvoker, req *PoolRanksReq) (*PoolRanksResp, error)
PoolReintegrate will set pool targets on specified ranks back to up state which should automatically start the reintegration process. Returns pool-ranks response and error.
func (*PoolRanksResp) Errors ¶
func (resp *PoolRanksResp) Errors() error
Errors returns either a generic failure based on the requested rankset failure or a rank-specific failure depending on whether or not FailedRank has been set in the response.
type PoolSetPropReq ¶
type PoolSetPropReq struct { // ID identifies the pool for which this property should be set. ID string Properties []*daos.PoolProperty // contains filtered or unexported fields }
PoolSetPropReq contains pool set-prop parameters.
type PoolUpdateACLReq ¶
type PoolUpdateACLReq struct { ID string // pool UUID or label ACL *AccessControlList // ACL entries to add to the pool // contains filtered or unexported fields }
PoolUpdateACLReq contains the input parameters for PoolUpdateACL
type PoolUpdateACLResp ¶
type PoolUpdateACLResp struct {
ACL *AccessControlList // actual ACL of the pool
}
PoolUpdateACLResp returns the updated ACL for the pool
func PoolUpdateACL ¶
func PoolUpdateACL(ctx context.Context, rpcClient UnaryInvoker, req *PoolUpdateACLReq) (*PoolUpdateACLResp, error)
PoolUpdateACL sends a request to add new entries and update existing entries in a pool's Access Control List. If it succeeds, it returns the updated ACL. If not, it returns an error.
type PoolUpgradeReq ¶
type PoolUpgradeReq struct { ID string // contains filtered or unexported fields }
PoolUpgradeReq contains the parameters for a pool upgrade request.
type PrimaryServiceRank ¶
type PrimaryServiceRank struct { Rank uint32 `json:"rank"` Uri string `json:"uri"` ProviderIdx uint32 `json:"provider_idx"` NumCtxs uint32 `json:"num_ctxs"` }
PrimaryServiceRank provides a rank->uri mapping for a DAOS Primary Service Rank (PSR).
type RanksReq ¶
type RanksReq struct { Ranks string `json:"ranks"` Force bool `json:"force"` CheckMode bool `json:"check_mode"` // contains filtered or unexported fields }
RanksReq contains the parameters for a system ranks request.
func (*RanksReq) SetReportCb ¶
func (r *RanksReq) SetReportCb(cb HostResponseReportFn)
type RanksResp ¶
type RanksResp struct { HostErrorsResp // record unresponsive hosts RankResults system.MemberResults }
RanksResp contains the response from a system ranks request.
func PrepShutdownRanks ¶
func PrepShutdownRanks(ctx context.Context, rpcClient UnaryInvoker, req *RanksReq) (*RanksResp, error)
PrepShutdownRanks concurrently performs prep shutdown ranks across all hosts supplied in the request's hostlist.
This is called from method of the same name in server/ctl_system.go with a populated host list in the request parameter and blocks until all results (successful or otherwise) are received after invoking fan-out. Returns a single response structure containing results generated with request responses from each selected rank.
func ResetFormatRanks ¶
func ResetFormatRanks(ctx context.Context, rpcClient UnaryInvoker, req *RanksReq) (*RanksResp, error)
ResetFormatRanks concurrently resets format state on ranks across all hosts supplied in the request's hostlist.
This is called from SystemResetFormat in server/ctl_system.go with a populated host list in the request parameter and blocks until all results (successful or otherwise) are received after invoking fan-out. Returns a single response structure containing results generated with request responses from each selected rank.
func StartRanks ¶
StartRanks concurrently performs start ranks across all hosts supplied in the request's hostlist.
This is called from SystemStart in server/ctl_system.go with a populated host list in the request parameter and blocks until all results (successful or otherwise) are received after invoking fan-out. Returns a single response structure containing results generated with request responses from each selected rank.
func StopRanks ¶
StopRanks concurrently performs stop ranks across all hosts supplied in the request's hostlist.
This is called from method of the same name in server/ctl_system.go with a populated host list in the request parameter and blocks until all results (successful or otherwise) are received after invoking fan-out. Returns a single response structure containing results generated with request responses from each selected rank.
type SCMQueryResult ¶
type SCMQueryResult struct { Module storage.ScmModule Info *storage.ScmFirmwareInfo Error error }
SCMFirmwareResult represents the results of a firmware query for a single SCM device.
type SCMUpdateResult ¶
SCMUpdateResult represents the results of a firmware update for a single SCM device.
type SetEngineLogMasksReq ¶
type SetEngineLogMasksReq struct { Masks *string `json:"masks"` Streams *string `json:"streams"` Subsystems *string `json:"subsystems"` // contains filtered or unexported fields }
SetEngineLogMasksReq contains the inputs for the set engine log level request.
type SetEngineLogMasksResp ¶
type SetEngineLogMasksResp struct { HostErrorsResp HostStorage HostStorageMap }
SetEngineLogMasksResp contains the results of a set engine log level request.
func SetEngineLogMasks ¶
func SetEngineLogMasks(ctx context.Context, rpcClient UnaryInvoker, req *SetEngineLogMasksReq) (*SetEngineLogMasksResp, error)
SetEngineLogMasks will send RPC to hostlist to request changes to log level of all DAOS engines on each host in list.
type SmdInfo ¶
type SmdInfo struct { Devices []*storage.SmdDevice `hash:"set" json:"devices"` Pools SmdPoolMap `json:"pools"` }
SmdInfo encapsulates SMD-specific information.
type SmdManageOpcode ¶
type SmdManageOpcode uint8
SmdManageOpcode defines an SmdManage operation.
const ( SetFaultyOp SmdManageOpcode DevReplaceOp LedCheckOp LedBlinkOp LedResetOp )
SmdManageOpcode definitions
func (SmdManageOpcode) String ¶
func (smo SmdManageOpcode) String() string
type SmdManageReq ¶
type SmdManageReq struct { IDs string // comma separated list of IDs Rank ranklist.Rank ReplaceUUID string // For device replacement, UUID of new device IdentifyTimeout uint32 // For LED identify, blink duration in minutes Operation SmdManageOpcode // contains filtered or unexported fields }
SmdManageReq contains the request parameters for a SMD query operation.
type SmdPool ¶
type SmdPool struct { UUID string `json:"uuid"` TargetIDs []int32 `hash:"set" json:"tgt_ids"` Blobs []uint64 `hash:"set" json:"blobs"` Rank ranklist.Rank `hash:"set" json:"rank"` }
SmdPool contains the per-server components of a DAOS pool.
type SmdPoolMap ¶
SmdPoolMap provides a map from pool UUIDs to per-rank pool info.
type SmdQueryReq ¶
type SmdQueryReq struct { OmitDevices bool `json:"omit_devices"` OmitPools bool `json:"omit_pools"` IncludeBioHealth bool `json:"include_bio_health"` UUID string `json:"uuid"` Rank ranklist.Rank `json:"rank"` FaultyDevsOnly bool `json:"-"` // only show faulty devices // contains filtered or unexported fields }
SmdQueryReq contains the request parameters for a SMD query operation.
type SmdResp ¶
type SmdResp struct { HostErrorsResp HostStorage HostStorageMap `json:"host_storage_map"` }
SmdResp represents the results of performing SMD query or manage operations across a set of hosts.
func SmdManage ¶
func SmdManage(ctx context.Context, rpcClient UnaryInvoker, req *SmdManageReq) (*SmdResp, error)
SmdManage concurrently performs per-server metadata operations across all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all SMD operations.
func SmdQuery ¶
func SmdQuery(ctx context.Context, rpcClient UnaryInvoker, req *SmdQueryReq) (*SmdResp, error)
SmdQuery concurrently performs per-server metadata operations across all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all SMD operations.
func (*SmdResp) ResultCount ¶
type StorageFormatReq ¶
type StorageFormatReq struct { Reformat bool `json:"reformat"` // contains filtered or unexported fields }
StorageFormatReq contains the parameters for a storage format request.
type StorageFormatResp ¶
type StorageFormatResp struct { HostErrorsResp HostStorage HostStorageMap }
StorageFormatResp contains the response from a storage format request.
func MockFormatResp ¶
func MockFormatResp(t *testing.T, mfc MockFormatConf) *StorageFormatResp
MockFormatResp returns a populated StorageFormatResp based on input config.
func StorageFormat ¶
func StorageFormat(ctx context.Context, rpcClient UnaryInvoker, req *StorageFormatReq) (*StorageFormatResp, error)
StorageFormat concurrently performs storage preparation steps across all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all host storage prepare operations.
type StorageScanReq ¶
type StorageScanReq struct { Usage bool `json:"usage"` NvmeHealth bool `json:"nvme_health"` NvmeBasic bool `json:"nvme_basic"` MemRatio float32 `json:"mem_ratio"` // contains filtered or unexported fields }
StorageScanReq contains the parameters for a storage scan request.
type StorageScanResp ¶
type StorageScanResp struct { HostErrorsResp HostStorage HostStorageMap }
StorageScanResp contains the response from a storage scan request.
func StorageScan ¶
func StorageScan(ctx context.Context, rpcClient UnaryInvoker, req *StorageScanReq) (*StorageScanResp, error)
StorageScan concurrently performs storage scans across all hosts supplied in the request's hostlist, or all configured hosts if not explicitly specified. The function blocks until all results (successful or otherwise) are received, and returns a single response structure containing results for all host scan operations.
NumaHealth option requests SSD health statistics. NumaMeta option requests DAOS server meta data stored on SSDs. NumaBasic option strips SSD details down to only the most basic.
type SystemCheckDisableReq ¶
type SystemCheckDisableReq struct { mgmtpb.CheckDisableReq // contains filtered or unexported fields }
type SystemCheckEnableReq ¶
type SystemCheckEnableReq struct { mgmtpb.CheckEnableReq // contains filtered or unexported fields }
type SystemCheckFindingClass ¶
type SystemCheckFindingClass chkpb.CheckInconsistClass
func CheckerPolicyClasses ¶
func CheckerPolicyClasses() []SystemCheckFindingClass
func (*SystemCheckFindingClass) FromString ¶
func (c *SystemCheckFindingClass) FromString(in string) error
func (SystemCheckFindingClass) String ¶
func (c SystemCheckFindingClass) String() string
type SystemCheckFlags ¶
type SystemCheckFlags uint32
func (SystemCheckFlags) MarshalJSON ¶
func (f SystemCheckFlags) MarshalJSON() ([]byte, error)
func (SystemCheckFlags) String ¶
func (f SystemCheckFlags) String() string
type SystemCheckGetPolicyReq ¶
type SystemCheckGetPolicyReq struct { mgmtpb.CheckGetPolicyReq // contains filtered or unexported fields }
func (*SystemCheckGetPolicyReq) SetClasses ¶
func (r *SystemCheckGetPolicyReq) SetClasses(classes []SystemCheckFindingClass)
type SystemCheckGetPolicyResp ¶
type SystemCheckGetPolicyResp struct { CheckerFlags SystemCheckFlags `json:"checker_flags"` Policies []*SystemCheckPolicy `json:"policies"` }
func SystemCheckGetPolicy ¶
func SystemCheckGetPolicy(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckGetPolicyReq) (*SystemCheckGetPolicyResp, error)
SystemCheckGetPolicy queries the system checker properties.
type SystemCheckPolicy ¶
type SystemCheckPolicy struct { FindingClass SystemCheckFindingClass RepairAction SystemCheckRepairAction }
func NewSystemCheckPolicy ¶
func NewSystemCheckPolicy(cls, act string) (*SystemCheckPolicy, error)
func (*SystemCheckPolicy) MarshalJSON ¶
func (p *SystemCheckPolicy) MarshalJSON() ([]byte, error)
func (*SystemCheckPolicy) String ¶
func (p *SystemCheckPolicy) String() string
func (*SystemCheckPolicy) UnmarshalJSON ¶
func (p *SystemCheckPolicy) UnmarshalJSON(in []byte) error
type SystemCheckPoolInfo ¶
type SystemCheckPoolInfo struct { RawRankInfo rawRankMap `json:"-"` UUID string `json:"uuid"` Label string `json:"label"` Status string `json:"status"` Phase string `json:"phase"` StartTime time.Time `json:"-"` Remaining time.Duration `json:"-"` Elapsed time.Duration `json:"-"` }
func (*SystemCheckPoolInfo) MarshalJSON ¶
func (p *SystemCheckPoolInfo) MarshalJSON() ([]byte, error)
func (*SystemCheckPoolInfo) String ¶
func (p *SystemCheckPoolInfo) String() string
func (*SystemCheckPoolInfo) Unchecked ¶
func (p *SystemCheckPoolInfo) Unchecked() bool
type SystemCheckQueryReq ¶
type SystemCheckQueryReq struct { mgmtpb.CheckQueryReq // contains filtered or unexported fields }
type SystemCheckQueryResp ¶
type SystemCheckQueryResp struct { Status SystemCheckStatus `json:"status"` ScanPhase SystemCheckScanPhase `json:"scan_phase"` StartTime time.Time `json:"start_time"` Pools map[string]*SystemCheckPoolInfo `json:"pools"` Reports []*SystemCheckReport `json:"reports"` }
func SystemCheckQuery ¶
func SystemCheckQuery(ctx context.Context, rpcClient UnaryInvoker, req *SystemCheckQueryReq) (*SystemCheckQueryResp, error)
SystemCheckQuery queries the system checker status.
func (*SystemCheckQueryResp) MarshalJSON ¶
func (r *SystemCheckQueryResp) MarshalJSON() ([]byte, error)
type SystemCheckRepairAction ¶
type SystemCheckRepairAction chkpb.CheckInconsistAction
func CheckerPolicyActions ¶
func CheckerPolicyActions() []SystemCheckRepairAction
func (*SystemCheckRepairAction) FromString ¶
func (a *SystemCheckRepairAction) FromString(in string) error
func (SystemCheckRepairAction) String ¶
func (a SystemCheckRepairAction) String() string
type SystemCheckRepairChoice ¶
type SystemCheckRepairChoice struct { Action SystemCheckRepairAction Info string }
SystemCheckRepairChoice describes a possible means to repair a checker error.
type SystemCheckRepairReq ¶
type SystemCheckRepairReq struct { mgmtpb.CheckActReq // contains filtered or unexported fields }
func (*SystemCheckRepairReq) SetAction ¶
func (r *SystemCheckRepairReq) SetAction(action int32) error
type SystemCheckReport ¶
type SystemCheckReport struct {
chkpb.CheckReport
}
SystemCheckReport contains the results of a system check.
func (*SystemCheckReport) IsInteractive ¶
func (r *SystemCheckReport) IsInteractive() bool
IsInteractive indicates whether this report requires user interaction to make a repair choice.
func (*SystemCheckReport) IsRemovedPool ¶
func (r *SystemCheckReport) IsRemovedPool() bool
IsRemovedPool indicates whether the error detected in this report indicates a missing pool.
func (*SystemCheckReport) RepairChoices ¶
func (r *SystemCheckReport) RepairChoices() []*SystemCheckRepairChoice
RepairChoices lists all possible repair options for this particular report.
func (*SystemCheckReport) Resolution ¶
func (r *SystemCheckReport) Resolution() string
Resolution returns a string describing the action taken to resolve this report.
type SystemCheckScanPhase ¶
type SystemCheckScanPhase chkpb.CheckScanPhase
func (SystemCheckScanPhase) Description ¶
func (p SystemCheckScanPhase) Description() string
func (SystemCheckScanPhase) MarshalJSON ¶
func (p SystemCheckScanPhase) MarshalJSON() ([]byte, error)
func (SystemCheckScanPhase) String ¶
func (p SystemCheckScanPhase) String() string
type SystemCheckSetPolicyReq ¶
type SystemCheckSetPolicyReq struct { ResetToDefaults bool AllInteractive bool Policies []*SystemCheckPolicy mgmtpb.CheckSetPolicyReq // contains filtered or unexported fields }
type SystemCheckStartReq ¶
type SystemCheckStartReq struct { Policies []*SystemCheckPolicy mgmtpb.CheckStartReq // contains filtered or unexported fields }
type SystemCheckStatus ¶
type SystemCheckStatus chkpb.CheckInstStatus
func (SystemCheckStatus) MarshalJSON ¶
func (p SystemCheckStatus) MarshalJSON() ([]byte, error)
func (SystemCheckStatus) String ¶
func (s SystemCheckStatus) String() string
type SystemCheckStopReq ¶
type SystemCheckStopReq struct { mgmtpb.CheckStopReq // contains filtered or unexported fields }
type SystemCleanupReq ¶
type SystemCleanupReq struct { Machine string `json:"machine"` // contains filtered or unexported fields }
SystemCleanupReq contains the inputs for the system cleanup request.
type SystemCleanupResp ¶
type SystemCleanupResp struct {
Results []*CleanupResult `json:"results"`
}
SystemCleanupResp contains the request response.
func SystemCleanup ¶
func SystemCleanup(ctx context.Context, rpcClient UnaryInvoker, req *SystemCleanupReq) (*SystemCleanupResp, error)
SystemCleanup requests resources associated with a machine name be cleanedup.
func (*SystemCleanupResp) Errors ¶
func (resp *SystemCleanupResp) Errors() (errOut error)
Errors returns a single error combining all error messages associated with a system cleanup response.
type SystemDrainReq ¶
type SystemDrainReq struct { Reint bool // contains filtered or unexported fields }
SystemDrainReq contains the inputs for the system drain request.
type SystemDrainResp ¶
type SystemDrainResp struct { Responses []*PoolRanksResp `json:"responses"` // contains filtered or unexported fields }
SystemDrainResp contains the request response. UnmarshalJSON is not implemented on this type because missing ranks or hosts specified in requests are not tolerated and therefore not returned in the response so decoding is not required.
func SystemDrain ¶
func SystemDrain(ctx context.Context, rpcClient UnaryInvoker, req *SystemDrainReq) (*SystemDrainResp, error)
SystemDrain will drain either hosts or ranks from all pools that they are members of. When hosts are specified in the request, any ranks that are resident on that host are drained from all relevant pools.
func (*SystemDrainResp) Errors ¶
func (resp *SystemDrainResp) Errors() (err error)
Errors returns a single error combining all error messages associated with pool-rank results. Doesn't retrieve errors from sysResponse because missing ranks or hosts will not be returned.
type SystemEraseReq ¶
type SystemEraseReq struct {
// contains filtered or unexported fields
}
SystemEraseReq contains the inputs for a system erase request.
func (*SystemEraseReq) SetMaxTries ¶
func (r *SystemEraseReq) SetMaxTries(mt uint)
SetMaxTries sets the maximum number of request attempts.
type SystemEraseResp ¶
type SystemEraseResp struct { HostErrorsResp Results system.MemberResults }
SystemEraseResp contains the results of a system erase request.
func SystemErase ¶
func SystemErase(ctx context.Context, rpcClient UnaryInvoker, req *SystemEraseReq) (*SystemEraseResp, error)
SystemErase initiates a wipe of system metadata prior to reformatting storage.
func (*SystemEraseResp) Errors ¶
func (resp *SystemEraseResp) Errors() error
Errors returns error if any of the results indicate a failure.
type SystemExcludeReq ¶
type SystemExcludeReq struct { Clear bool // contains filtered or unexported fields }
SystemExcludeReq contains the inputs for the system exclude request.
type SystemExcludeResp ¶
type SystemExcludeResp struct { Results system.MemberResults // contains filtered or unexported fields }
SystemExcludeResp contains the request response. UnmarshalJSON is not implemented on this type because missing ranks or hosts specified in requests are not tolerated and therefore not returned in the response so decoding is not required.
func SystemExclude ¶
func SystemExclude(ctx context.Context, rpcClient UnaryInvoker, req *SystemExcludeReq) (*SystemExcludeResp, error)
SystemExclude will mark the specified ranks as administratively excluded from the system.
func (*SystemExcludeResp) Errors ¶
func (resp *SystemExcludeResp) Errors() error
Errors returns a single error combining all error messages associated with a system exclude response. Doesn't retrieve errors from sysResponse because missing ranks or hosts will not be populated in SystemExcludeResp.
type SystemGetAttrReq ¶
type SystemGetAttrReq struct { Keys []string // contains filtered or unexported fields }
SystemGetAttrReq contains the inputs for the system get-attr request.
type SystemGetAttrResp ¶
SystemGetAttrResp contains the request response.
func SystemGetAttr ¶
func SystemGetAttr(ctx context.Context, rpcClient UnaryInvoker, req *SystemGetAttrReq) (*SystemGetAttrResp, error)
SystemGetAttr gets system attributes.
type SystemGetPropReq ¶
type SystemGetPropReq struct { Keys []daos.SystemPropertyKey // contains filtered or unexported fields }
SystemGetPropReq contains the inputs for the system get-attr request.
type SystemGetPropResp ¶
type SystemGetPropResp struct {
Properties []*daos.SystemProperty `json:"properties"`
}
SystemGetPropResp contains the request response.
func SystemGetProp ¶
func SystemGetProp(ctx context.Context, rpcClient UnaryInvoker, req *SystemGetPropReq) (*SystemGetPropResp, error)
SystemGetProp gets system attributes.
type SystemJoinReq ¶
type SystemJoinReq struct { ControlAddr *net.TCPAddr UUID string Rank ranklist.Rank URI string SecondaryURIs []string `json:"secondary_uris"` NumContexts uint32 `json:"nctxs"` NumSecondaryContexts []uint32 `json:"secondary_nctxs"` FaultDomain *system.FaultDomain `json:"srv_fault_domain"` InstanceIdx uint32 `json:"idx"` Incarnation uint64 `json:"incarnation"` CheckMode bool `json:"check_mode"` // contains filtered or unexported fields }
SystemJoinReq contains the inputs for the system join request.
func (*SystemJoinReq) MarshalJSON ¶
func (req *SystemJoinReq) MarshalJSON() ([]byte, error)
MarshalJSON packs SystemJoinResp struct into a JSON message.
func (*SystemJoinReq) SetMaxTries ¶
func (r *SystemJoinReq) SetMaxTries(mt uint)
SetMaxTries sets the maximum number of request attempts.
type SystemJoinResp ¶
type SystemJoinResp struct { Rank ranklist.Rank State system.MemberState LocalJoin bool MapVersion uint32 `json:"map_version"` }
SystemJoinResp contains the request response.
func SystemJoin ¶
func SystemJoin(ctx context.Context, rpcClient UnaryInvoker, req *SystemJoinReq) (*SystemJoinResp, error)
SystemJoin will attempt to join a new member to the DAOS system.
func (*SystemJoinResp) UnmarshalJSON ¶
func (resp *SystemJoinResp) UnmarshalJSON(data []byte) error
type SystemQueryReq ¶
type SystemQueryReq struct { NotOK bool // Only show engines not in a joined state WantedStates system.MemberState // Bitmask of desired states // contains filtered or unexported fields }
SystemQueryReq contains the inputs for the system query request.
func (*SystemQueryReq) SetMaxTries ¶
func (r *SystemQueryReq) SetMaxTries(mt uint)
SetMaxTries sets the maximum number of request attempts.
type SystemQueryResp ¶
type SystemQueryResp struct { Members system.Members `json:"members"` Providers []string `json:"providers"` // contains filtered or unexported fields }
SystemQueryResp contains the request response.
func SystemQuery ¶
func SystemQuery(ctx context.Context, rpcClient UnaryInvoker, req *SystemQueryReq) (*SystemQueryResp, error)
SystemQuery requests DAOS system status.
Handles MS requests sent from management client app e.g. 'dmg' and calls into mgmt_system.go method of the same name. The triggered method uses the control API to fanout to (selection or all) gRPC servers listening as part of the DAOS system and retrieve results from the selected ranks hosted there.
func (*SystemQueryResp) Errors ¶
func (resp *SystemQueryResp) Errors() error
Errors returns a single error combining all error messages associated with a system query response.
func (*SystemQueryResp) UnmarshalJSON ¶
func (resp *SystemQueryResp) UnmarshalJSON(data []byte) error
UnmarshalJSON unpacks JSON message into SystemQueryResp struct.
type SystemSetAttrReq ¶
type SystemSetAttrReq struct { Attributes map[string]string // contains filtered or unexported fields }
SystemSetAttrReq contains the inputs for the system set-attr request.
type SystemSetPropReq ¶
type SystemSetPropReq struct { Properties map[daos.SystemPropertyKey]daos.SystemPropertyValue // contains filtered or unexported fields }
SystemSetPropReq contains the inputs for the system set-prop request.
type SystemStartReq ¶
type SystemStartReq struct {
// contains filtered or unexported fields
}
SystemStartReq contains the inputs for the system start request.
type SystemStartResp ¶
type SystemStartResp struct { Results system.MemberResults // resulting from harness starts // contains filtered or unexported fields }
SystemStartResp contains the request response.
func SystemStart ¶
func SystemStart(ctx context.Context, rpcClient UnaryInvoker, req *SystemStartReq) (*SystemStartResp, error)
SystemStart will perform a start after a controlled shutdown of DAOS system.
Handles MS requests sent from management client app e.g. 'dmg' and calls into mgmt_system.go method of the same name. The triggered method uses the control API to fanout to (selection or all) gRPC servers listening as part of the DAOS system and retrieve results from the selected ranks hosted there.
func (*SystemStartResp) Errors ¶
func (resp *SystemStartResp) Errors() error
Errors returns a single error combining all error messages associated with a system start response.
func (*SystemStartResp) UnmarshalJSON ¶
func (resp *SystemStartResp) UnmarshalJSON(data []byte) error
UnmarshalJSON unpacks JSON message into SystemStartResp struct.
type SystemStopReq ¶
type SystemStopReq struct { Force bool // contains filtered or unexported fields }
SystemStopReq contains the inputs for the system stop command.
type SystemStopResp ¶
type SystemStopResp struct { Results system.MemberResults // contains filtered or unexported fields }
SystemStopResp contains the request response.
func SystemStop ¶
func SystemStop(ctx context.Context, rpcClient UnaryInvoker, req *SystemStopReq) (*SystemStopResp, error)
SystemStop will perform a two-phase controlled shutdown of DAOS system and a list of remaining system members on failure.
Handles MS requests sent from management client app e.g. 'dmg' and calls into mgmt_system.go method of the same name. The triggered method uses the control API to fanout to (selection or all) gRPC servers listening as part of the DAOS system and retrieve results from the selected ranks hosted there.
func (*SystemStopResp) Errors ¶
func (resp *SystemStopResp) Errors() error
Errors returns a single error combining all error messages associated with a system stop response.
func (*SystemStopResp) UnmarshalJSON ¶
func (resp *SystemStopResp) UnmarshalJSON(data []byte) error
UnmarshalJSON unpacks JSON message into SystemStopResp struct.
type UnaryInvoker ¶
type UnaryInvoker interface { GetComponent() build.Component InvokeUnaryRPC(ctx context.Context, req UnaryRequest) (*UnaryResponse, error) InvokeUnaryRPCAsync(ctx context.Context, req UnaryRequest) (HostResponseChan, error) // contains filtered or unexported methods }
UnaryInvoker defines an interface to be implemented by clients capable of invoking a unary RPC (1 response for 1 request).
type UnaryRequest ¶
type UnaryRequest interface {
// contains filtered or unexported methods
}
UnaryRequest defines an interface to be implemented by unary request types (1 response to 1 request).
type UnaryResponse ¶
type UnaryResponse struct { Responses []*HostResponse // contains filtered or unexported fields }
UnaryResponse contains a slice of *HostResponse items returned from synchronous unary RPC invokers.
func MockMSResponse ¶
func MockMSResponse(hostAddr string, hostErr error, hostMsg proto.Message) *UnaryResponse
MockMSResponse creates a synthetic Management Service response from the supplied HostResponse values.