Documentation
¶
Overview ¶
Package executor provides the top-level checkpoint and restore executors. These wire together the lib packages (criu, cuda, etc.) into multi-step workflows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checkpoint ¶
func Checkpoint(ctx context.Context, ctrd *containerd.Client, log logr.Logger, req CheckpointRequest, cfg *types.AgentConfig) error
Checkpoint performs a CRIU dump of a container. The operation has three phases: inspect, configure, capture.
The checkpoint directory is staged under tmp/<uuid> during the operation. On success, the previous checkpoint is removed and the staged directory is renamed into place at the base path root.
func Restore ¶
func Restore(ctx context.Context, ctrd *containerd.Client, log logr.Logger, req RestoreRequest) (int, error)
Restore performs external restore for the given request. Returns the namespace-relative PID of the restored process. The DaemonSet side inspects the placeholder and launches nsrestore, which handles rootfs application, CRIU restore, and CUDA restore inside the namespace.
Types ¶
type CheckpointRequest ¶
type CheckpointRequest struct {
ContainerID string
ContainerName string
CheckpointID string
CheckpointLocation string
StartedAt time.Time
NodeName string
PodName string
PodNamespace string
Clientset kubernetes.Interface
}
CheckpointRequest holds per-checkpoint identifiers for a checkpoint operation.
type RestoreInNamespaceResult ¶
type RestoreInNamespaceResult struct {
RestoredPID int `json:"restoredPID"`
NSRestoreSetupDuration time.Duration `json:"nsrestoreSetupDuration"`
CRIURestoreDuration time.Duration `json:"criuRestoreDuration"`
CUDADuration time.Duration `json:"cudaDuration"`
}
func RestoreInNamespace ¶
func RestoreInNamespace(ctx context.Context, opts RestoreOptions, log logr.Logger) (*RestoreInNamespaceResult, error)
RestoreInNamespace performs a full restore from inside the target container's namespaces.
type RestoreOptions ¶
RestoreOptions holds configuration for an in-namespace restore.