Help us shape the future of Go! Take the 2026 Go Developer Survey

rtcheck

package
v1.35.9-stratum.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package rtcheck compares what is installed on disk with what is actually serving: a node can run a different containerd than the one on disk when an orphan from an earlier run holds the CRI socket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Installed

func Installed(ctx context.Context, bin string) (string, error)

Installed is the version `bin --version` prints: the first token that starts with a digit once a leading "v" is dropped. It matches both "containerd github.com/containerd/containerd/v2 v2.4.1+stratum <rev>" and "Kubernetes v<k8s version>-stratum".

func Same

func Same(a, b string) bool

Same compares two versions ignoring a leading "v": containerd's CRI reports its version with or without one depending on the caller.

func Serving

func Serving(ctx context.Context, sock string) (string, error)

Serving asks the CRI runtime on the unix socket for its version (runtime.v1.RuntimeService/Version, an empty request) and returns VersionResponse.runtime_version. Whatever answers the socket is what this reports, so an orphan holding it shows up as its own version.

Whatever answers the socket is not trusted: the version and any error text it sends back are printed to an operator's terminal, so both are cleaned (clean) before they leave this package, and a reply that is not a plain version cannot match the installed one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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