crutils

package
v4.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRApplyRootFsDiffTar

func CRApplyRootFsDiffTar(baseDirectory, containerRootDirectory string) error

CRApplyRootFsDiffTar applies the tar archive found in baseDirectory with the root file system changes on top of containerRootDirectory

func CRCreateFileWithLabel

func CRCreateFileWithLabel(directory, fileName, fileLabel string) error

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

func CRGetRuntimeFromArchive(input string) (*string, error)

CRGetRuntimeFromArchive extracts the checkpoint metadata from the given checkpoint archive and returns the runtime used to create the given checkpoint archive.

func CRImportCheckpointConfigOnly

func CRImportCheckpointConfigOnly(destination, input string) error

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

func CRImportCheckpointWithoutConfig(destination, input string) error

CRImportCheckpointWithoutConfig imports the checkpoint archive (input) into the directory destination without "config.dump" and "spec.dump"

func CRRemoveDeletedFiles

func CRRemoveDeletedFiles(id, baseDirectory, containerRootDirectory string) error

CRRemoveDeletedFiles loads the list of deleted files and if it exists deletes all files listed.

func CRRuntimeSupportsCheckpointRestore

func CRRuntimeSupportsCheckpointRestore(runtimePath string) bool

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. What runc does is the official definition of the checkpoint/restore interface.

func CRRuntimeSupportsPodCheckpointRestore

func CRRuntimeSupportsPodCheckpointRestore(runtimePath string) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL