ateompath

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Ateom and atelet need to agree on many filesystem paths. They are defined in this package.

Index

Constants

View Source
const (
	// The base path.  This is both the path of the root shared folder on the
	// host filesystem, and when it is mounted into ateom and atelet containers.
	BasePath = "/var/lib/ateom-gvisor"
)
View Source
const DurableDirTarFile = "durable-dir.tar"

DurableDirTarFile is the snapshot file holding the tar of an actor's durable-dir volumes (entries are <volumeName>/... relative to DurableDirVolumeMountsDir). Written by ateom-microvm at checkpoint; a DATA snapshot consists of this file alone, so atelet uses the name to carve the durable data out of a FULL snapshot's file set.

Variables

View Source
var (
	// StaticFilesDir holds things like downloaded runsc binaries.
	StaticFilesDir = filepath.Join(BasePath, "static-files")

	// ImageCacheDir is the node-local OCI image layer cache (see
	// internal/imagecache). It lives under BasePath so the cached layer
	// directories are visible at the same path in atelet (which writes them)
	// and in every ateom pod (which mounts them as overlay lowerdirs).
	ImageCacheDir = filepath.Join(BasePath, "image-cache")

	// ActorsDir holds the per-actor state directories (see ActorPath). The
	// image cache's eviction root-set scan reads the bundle overlay specs
	// under it.
	ActorsDir = filepath.Join(BasePath, "actors")

	// CredentialBrokerSocket is the node-local atelet socket used by atunnel
	// to request credentials for the worker's current actor assignment.
	CredentialBrokerSocket = filepath.Join(BasePath, "credential-broker.sock")
)

Functions

func ActorPath

func ActorPath(actorUID string) string

func ActorSandboxAssetsFile added in v0.1.0

func ActorSandboxAssetsFile(actorUID string) string

ActorSandboxAssetsFile is the per-actor file where atelet records the sandbox binaries (class + content-addressed asset set, for this node's architecture) the actor is currently running. It is written at Run/Restore and read at Checkpoint (when the request no longer carries the sandbox config). It lives directly under ActorPath — NOT under a subdir wiped by atelet's resetActorDirs — so it survives between Run and a later Checkpoint.

func AteletOTLPSocketPath added in v0.1.0

func AteletOTLPSocketPath() string

AteletOTLPSocketPath is the node-scoped unix socket atelet serves the OTLP relay on (see internal/otlprelay). It is node-scoped rather than per-pod because every ateom on the node pushes into the same relay: atelet is a DaemonSet, so one socket collapses N per-pod collector connections into one per-node connection.

It sits directly under BasePath, which is the host directory already mounted at the same path into atelet and into every ateom pod, so no new volume is needed for ateom to reach it. Note that BasePath is mounted writable (workerpool_apply.go) and shared with CredentialBrokerSocket and the image cache, so a worker pod can unlink or replace this socket. Confining atelet-owned sockets to a subdirectory mounted read-only would be an improvement, but it is a property of the whole BasePath mount rather than of this socket — a read-only subdir needs its own volume and mount, and the pod keeps CAP_SYS_ADMIN. Tracked separately rather than solved here.

func AteomNetNSName

func AteomNetNSName(podUID string) string

func AteomNetNSPath

func AteomNetNSPath(podUID string) string

func AteomPath

func AteomPath(podUID string) string

func AteomSocketPath

func AteomSocketPath(podUID string) string

func AteomsDir added in v0.1.0

func AteomsDir() string

AteomsDir is the parent of every per-ateom directory. Each ateom creates AteomPath(podUID) under it when it boots, so listing this directory is how a scraper with no prior knowledge discovers the node's ateoms.

func CheckpointStateDir added in v0.1.0

func CheckpointStateDir(actorUID string) string

func DurableDirVolumeMountPoint added in v0.1.0

func DurableDirVolumeMountPoint(actorUID, volumeName string) string

DurableDirVolumeMountPoint returns the path where a specific durable-dir volume is mounted on the nodeVM.

func DurableDirVolumeMountsDir added in v0.1.0

func DurableDirVolumeMountsDir(actorUID string) string

DurableDirVolumeMountsDir is the directory where individual durable-dir volumes are mounted.

func GVisorReleaseDir added in v0.1.0

func GVisorReleaseDir(sha256 string) string

GVisorReleaseDir is the directory a gVisor release tarball (gvisor.tar.bz2, containing runsc plus its gvisor-bin/ helper binaries) is extracted into, content-addressed by the tarball's sha256. runsc requires the gvisor-bin/ subdirectory to sit next to it, so the whole release is kept together under one directory rather than as loose files in StaticFilesDir.

func ImageVolumeMountPath added in v0.1.0

func ImageVolumeMountPath(actorUID, containerName, volumeName string) string

ImageVolumeMountPath returns where ateom composes one image volume for a container. The path is per-container: containers of one actor may mount the same volume, and each needs its own mount point inside its own bundle.

func ImageVolumeMountPathInBundle added in v0.1.0

func ImageVolumeMountPathInBundle(bundlePath, volumeName string) string

ImageVolumeMountPathInBundle returns the image volume mount path inside a bundle path.

func KubeletPluginSocketPath added in v0.1.0

func KubeletPluginSocketPath(driverName string) string

KubeletPluginSocketPath returns the path to the CSI driver socket in kubelet plugins directory.

func LocalCheckpointsDir added in v0.1.0

func LocalCheckpointsDir(actorUID string) string

func LocalSnapshotDir added in v0.1.0

func LocalSnapshotDir(actorUID, snapshotName string) string

LocalSnapshotDir is the directory holding one named local (pause) snapshot of an actor: the checkpoint files plus their manifest.

func OCIBundleDir

func OCIBundleDir(actorUID string) string

func OCIBundlePath

func OCIBundlePath(actorUID, containerName string) string

func PIDFileDir

func PIDFileDir(actorUID string) string

func PIDFilePath

func PIDFilePath(actorUID, containerName string) string

func RestoreStateDir added in v0.1.0

func RestoreStateDir(actorUID string) string

RestoreStateDir is the local directory to use to restore an actor from a checkpoint downloaded from GCS.

We need to use a different path from CheckpointStateDir, because using `runsc restore -direct -background` means that runsc starts executing first, then demand-pages in parts of the checkpoint file as they are needed. To know when the background reading is finished, we would need to run `runsc wait -checkpoint`, which will block until the read is done. Alternatively, we can make sure we write the suspension checkpoint to a different location. This will work properly, with `runsc checkpoint` paging in any data that hasn't yet been loaded.

func RunSCBinaryPath

func RunSCBinaryPath(sha256 string) string

func RunSCStateDir

func RunSCStateDir(actorUID string) string

func RunscDebugLogDir

func RunscDebugLogDir(actorUID, containerName string) string

func StagingDirPrefix added in v0.1.0

func StagingDirPrefix() string

StagingDirPrefix returns the prefix directory for staging CSI volumes.

func SystemInfoVolumeRoot added in v0.1.0

func SystemInfoVolumeRoot(actorUID, volumeName string) string

SystemInfoVolumeRoot returns the host path of the root directory for a specific system-info volume.

func SystemInfoVolumeRootsDir added in v0.1.0

func SystemInfoVolumeRootsDir(actorUID string) string

SystemInfoVolumeRootsDir is the directory containing the per-volume root directories of system-info volumes. Snapshots must capture durable-dir data but never system-info contents, which atelet regenerates on every Run/Restore; each sandbox class excludes them differently:

  • micro-VM captures by location: its checkpoint tars all of DurableDirVolumeMountsDir (see ateom-microvm's tarDurableVolumes), so system-info roots are excluded by living in this separate directory.
  • gVisor captures by declaration: durable mounts are registered with the sandbox (mount-hint annotations for FULL checkpoints, the enumerated durable mount paths for DATA fscheckpoints); system-info mounts are plain undeclared binds, never captured regardless of host layout.

The separate directory is therefore critical only for micro-VM.

func VolumeHostPath added in v0.1.0

func VolumeHostPath(actorUID, volumeName string) string

func VolumesDir added in v0.1.0

func VolumesDir(actorUID string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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