crutils

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 2

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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