Documentation ¶
Index ¶
- func CRApplyRootFsDiffTar(baseDirectory, containerRootDirectory string) error
- func CRCreateFileWithLabel(directory, fileName, fileLabel string) error
- func CRCreateRootFsDiffTar(changes *[]archive.Change, mountPoint, destination string) (includeFiles []string, err error)
- func CRGetRuntimeFromArchive(input string) (*string, error)
- func CRImportCheckpointConfigOnly(destination, input string) error
- func CRImportCheckpointWithoutConfig(destination, input string) error
- func CRRemoveDeletedFiles(id, baseDirectory, containerRootDirectory string) error
- func CRRuntimeSupportsCheckpointRestore(runtimePath string) bool
- func CRRuntimeSupportsPodCheckpointRestore(runtimePath string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CRApplyRootFsDiffTar ¶
CRApplyRootFsDiffTar applies the tar archive found in baseDirectory with the root file system changes on top of containerRootDirectory
func CRCreateFileWithLabel ¶
CRCreateFileWithLabel creates an empty file and sets the corresponding ('fileLabel') SELinux label on the file. This is necessary for CRIU log files because CRIU infects the processes in the container with a 'parasite' and this will also try to write to the log files from the context of the container processes.
func CRCreateRootFsDiffTar ¶
func CRCreateRootFsDiffTar(changes *[]archive.Change, mountPoint, destination string) (includeFiles []string, err error)
CRCreateRootFsDiffTar goes through the 'changes' and can create two files: * metadata.RootFsDiffTar will contain all new and changed files * metadata.DeletedFilesFile will contain a list of deleted files With these two files it is possible to restore the container file system to the same state it was during checkpointing. Changes to directories (owner, mode) are not handled.
func CRGetRuntimeFromArchive ¶
CRGetRuntimeFromArchive extracts the checkpoint metadata from the given checkpoint archive and returns the runtime used to create the given checkpoint archive.
func CRImportCheckpointConfigOnly ¶
CRImportCheckpointConfigOnly only imports the checkpoint configuration from the checkpoint archive (input) into the directory destination. Only the files "config.dump" and "spec.dump" are extracted.
func CRImportCheckpointWithoutConfig ¶
CRImportCheckpointWithoutConfig imports the checkpoint archive (input) into the directory destination without "config.dump" and "spec.dump"
func CRRemoveDeletedFiles ¶
CRRemoveDeletedFiles loads the list of deleted files and if it exists deletes all files listed.
func CRRuntimeSupportsCheckpointRestore ¶
CRRuntimeSupportsCheckpointRestore tests if the given runtime at 'runtimePath' supports checkpointing. The checkpoint restore interface has no definition but crun implements all commands just as runc does. Whathh runc does it the official definition of the checkpoint/restore interface.
func CRRuntimeSupportsPodCheckpointRestore ¶
CRRuntimeSupportsCheckpointRestore tests if the runtime at 'runtimePath' supports restoring into existing Pods. The runtime needs to support the CRIU option --lsm-mount-context and the existence of this is checked by this function. In addition it is necessary to at least have CRIU 3.16.
Types ¶
This section is empty.