checkpointmanager

package
v1.34.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 5 Imported by: 266

README

DISCLAIMER

  • Sig-Node community has reached a general consensus, as a best practice, to avoid introducing any new checkpointing support. We reached this understanding after struggling with some hard-to-debug issues in the production environments caused by the checkpointing.
  • Any changes to the checkpointed data structure would be considered incompatible and a component should add its own handling if it needs to ensure backward compatibility of reading old-format checkpoint files.

Introduction

This folder contains a framework & primitives, Checkpointing Manager, which is used by several other Kubelet submodules, devicemanager, pods, cpumanager, memorymanager, dra and allocation, to implement checkpointing at each submodule level. As already explained in above Disclaimer section, think twice before introducing any further checkpointing in Kubelet. If still checkpointing is required, then this folder provides the common APIs and the framework for implementing checkpointing. Using same APIs across all the submodules will help maintaining consistency at Kubelet level.

Below is the history of checkpointing support in Kubelet.

Package First checkpointing support merged on PR link Status
kubelet/dockershim Feb 3, 2017 [CRI] Implement Dockershim Checkpoint Removed
devicemanager Sep 6, 2017 Deviceplugin checkpoint In use
kubelet/pod Nov 22, 2017 Initial basic bootstrap-checkpoint support In use
cpumanager Oct 27, 2017 Add file backed state to cpu manager In use
memorymanager Feb 9, 2021 Memory manager In use
dra Mar 12, 2023 kubelet dra: Add checkpointing mechanism in the DRA Manager In use
dra Jul 24, 2024 DRA:refactor checkpointing In use
allocation Feb 28, 2025 Move pod resource allocation management out of the status manager In use

Note: Dockershim has been removed from the Kubernetes project as of release 1.24, as a consequence dockershim checkpoint support has also been removed.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint interface {
	MarshalCheckpoint() ([]byte, error)
	UnmarshalCheckpoint(blob []byte) error
	VerifyChecksum() error
}

Checkpoint provides the process checkpoint data

type CheckpointManager

type CheckpointManager interface {
	// CreateCheckpoint persists checkpoint in CheckpointStore. checkpointKey is the key for utilstore to locate checkpoint.
	// For file backed utilstore, checkpointKey is the file name to write the checkpoint data.
	CreateCheckpoint(checkpointKey string, checkpoint Checkpoint) error
	// GetCheckpoint retrieves checkpoint from CheckpointStore.
	GetCheckpoint(checkpointKey string, checkpoint Checkpoint) error
	// WARNING: RemoveCheckpoint will not return error if checkpoint does not exist.
	RemoveCheckpoint(checkpointKey string) error
	// ListCheckpoint returns the list of existing checkpoints.
	ListCheckpoints() ([]string, error)
}

CheckpointManager provides the interface to manage checkpoint

func NewCheckpointManager

func NewCheckpointManager(checkpointDir string) (CheckpointManager, error)

NewCheckpointManager returns a new instance of a checkpoint manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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