Documentation
¶
Index ¶
- func BuildDMCommand(profile *nnfv1alpha5.NnfDataMovementProfile, hostfile string, ...) ([]string, error)
- func CreateMpiHostfile(profile *nnfv1alpha5.NnfDataMovementProfile, hosts []string, ...) (string, error)
- func ExtractIndexMountDir(path, namespace string) (string, error)
- func GetDMProfile(clnt client.Client, ctx context.Context, dm *nnfv1alpha5.NnfDataMovement) (*nnfv1alpha5.NnfDataMovementProfile, error)
- func GetDestinationDir(profile *nnfv1alpha5.NnfDataMovementProfile, dm *nnfv1alpha5.NnfDataMovement, ...) (string, error)
- func GetStorageNodeNames(clnt client.Client, ctx context.Context, dm *nnfv1alpha5.NnfDataMovement) ([]string, error)
- func GetWorkerHostnames(clnt client.Client, ctx context.Context, nodes []string) ([]string, error)
- func HandleIndexMountDir(profile *nnfv1alpha5.NnfDataMovementProfile, dm *nnfv1alpha5.NnfDataMovement, ...) (string, error)
- func ParseDcpProgress(line string, cmdStatus *nnfv1alpha5.NnfDataMovementCommandStatus) error
- func ParseDcpStats(line string, cmdStatus *nnfv1alpha5.NnfDataMovementCommandStatus) error
- func PeekMpiHostfile(hostfile string) string
- func PrepareDestination(clnt client.Client, ctx context.Context, ...) error
- func ProgressCollectionEnabled(collectInterval time.Duration) bool
- func TrimDcpProgressFromOutput(output string) string
- func WriteMpiHostfile(dmName string, hosts []string, slots, maxSlots int) (string, error)
- type DataMovementCancelContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDMCommand ¶
func BuildDMCommand(profile *nnfv1alpha5.NnfDataMovementProfile, hostfile string, dm *nnfv1alpha5.NnfDataMovement, log logr.Logger) ([]string, error)
func CreateMpiHostfile ¶
func CreateMpiHostfile(profile *nnfv1alpha5.NnfDataMovementProfile, hosts []string, dm *nnfv1alpha5.NnfDataMovement) (string, error)
Create an MPI hostfile given settings from a profile and user config from the dm
func ExtractIndexMountDir ¶
Pull out the index mount directory from the path for the correct file systems that require it
func GetDMProfile ¶
func GetDMProfile(clnt client.Client, ctx context.Context, dm *nnfv1alpha5.NnfDataMovement) (*nnfv1alpha5.NnfDataMovementProfile, error)
func GetDestinationDir ¶
func GetDestinationDir(profile *nnfv1alpha5.NnfDataMovementProfile, dm *nnfv1alpha5.NnfDataMovement, mpiHostfile string, log logr.Logger) (string, error)
Determine the directory path to create based on the source and destination. Returns the mkdir directory and error.
func GetStorageNodeNames ¶
func GetStorageNodeNames(clnt client.Client, ctx context.Context, dm *nnfv1alpha5.NnfDataMovement) ([]string, error)
Retrieve the NNF Nodes that are the target of the data movement operation
func GetWorkerHostnames ¶
func HandleIndexMountDir ¶
func HandleIndexMountDir(profile *nnfv1alpha5.NnfDataMovementProfile, dm *nnfv1alpha5.NnfDataMovement, destDir, indexMount, mpiHostfile string, log logr.Logger) (string, error)
Given a destination directory and index mount directory, apply the necessary changes to the destination directory and the DM's destination path to account for index mount directories
func ParseDcpProgress ¶
func ParseDcpProgress(line string, cmdStatus *nnfv1alpha5.NnfDataMovementCommandStatus) error
func ParseDcpStats ¶
func ParseDcpStats(line string, cmdStatus *nnfv1alpha5.NnfDataMovementCommandStatus) error
Go through the list of dcp stat regexes, parse them, and put them in their appropriate place in cmdStatus
func PeekMpiHostfile ¶
Get the first line of the hostfile for verification
func PrepareDestination ¶
func PrepareDestination(clnt client.Client, ctx context.Context, profile *nnfv1alpha5.NnfDataMovementProfile, dm *nnfv1alpha5.NnfDataMovement, mpiHostfile string, log logr.Logger) error
func TrimDcpProgressFromOutput ¶ added in v0.1.14
Walk through the output of the dcp command and remove all of the progress lines except for the first and last occurrences. Insert a snippet <snipped dcp progress output> to indicate that the output has been trimmed.
func WriteMpiHostfile ¶
Create the MPI Hostfile given a list of hosts, slots, and maxSlots. A temporary directory is created based on the DM Name. The hostfile is created inside of this directory. A value of 0 for slots or maxSlots will not use it in the hostfile.
Types ¶
type DataMovementCancelContext ¶
type DataMovementCancelContext struct {
Ctx context.Context
Cancel context.CancelFunc
}
Keep track of the context and its cancel function so that we can track and cancel data movement operations in progress