Skip to content

v1.2.3

Latest

Choose a tag to compare

@github-actions github-actions released this 13 Nov 12:09
· 92 commits to main since this release
Immutable release. Only release title and notes can be modified.
v1.2.3
4ec80a6

Highlights

  • createContainer restores a container from a checkpoint if the request sets a restorePath (RestorePath in Go): the server runs the restore command of the runtime instead of create, like conmon with --restore, and monitors the restored container like a created one. Servers report the restore feature (FeatureRestore), the Go client fails with ErrUnsupported on older ones. CRI-O still has to restore through the client. (#3558, #3560)
  • The features which CRI-O does not use are removed: the pause subcommand with createNamespaces, the fd socket with startFdSocket, the sd_notify relay, the json log driver, cleanup commands, global arguments and environment variables of the runtime, and the journald tag and labels. Requests for them fail as not supported, the clients which CRI-O vendors (v1.0.1, v1.2.1 and v1.2.2) keep working. (#3551)
  • OOM kills get detected with cgroup v2 only. On a host with cgroup v1 or a hybrid setup the containers still run, but the server writes no OOM files and logs one warning about it, which the server log driver none, the default of CRI-O, does not show. (#3582)
  • The lines of the server log name the container they are about at every log level, before only at debug, so journalctl -t conmonrs -g <id> finds them. At info, the server logs the exit of a container with its PID, its exit code and whether it got OOM killed, an OOM as it happens, a runtime or an exec process killed at its timeout and the containers it signals and kills at its shutdown. (#3581)
  • SIGQUIT shuts the server down like SIGINT, like conmon, instead of ending it with a core dump and without killing the containers and removing the socket. On SIGTERM, the server forwards the signal to the containers and gives them up to 5 seconds to exit with their own exit codes before it kills them. (#3528, #3581)
  • An execSyncContainer process which does not die at its timeout, like a probe stuck on a hung NFS or FUSE mount, stays tracked until it got reaped, so the shutdown waits for it and reports it. The client still gets -3 right at the timeout, and the server stops collecting the output then. (#3561, #3573)
  • Stdin which a streaming client sent right before a clean close reaches the process as long as it keeps taking it, also when the runtime takes more than 5 seconds to start an exec, only a process which takes none of it for 5 seconds loses the rest. Before, the uploads of clients which close right after their last write, like the Python client or Ansible k8s_cp, got cut after about a second. (#3527, #3542)

Changes which may need action

  • Go client, renamed (the module path stays v1, .github/go-api-break lists every incompatible change against v1.2.2): AttachConfig is AttachContainerConfig, ExecSyncConfig is ExecSyncContainerConfig, ExecContainerResult is ExecSyncContainerResult, CreateContainerResponse is CreateContainerResult, the Tty of the attach and serve exec configs is Terminal, and Shutdown and Kill take a context and replace ShutdownContext and KillContext. (#3554, #3567)
  • Go client, changed types: ExecSyncContainerConfig.Timeout is a time.Duration, rounded up to whole seconds (a CRI timeout needs time.Duration(timeout) * time.Second, a negative one fails with ErrInvalidValue). Version(ctx) takes no config and returns a VersionResult, the ServerVersion plus the PID, without the cargo tree. AttachStreams takes an io.ReadCloser and io.WriteClosers, and ConmonServerConfig takes Tracing and Heaptrack as values and *os.File for Stdout and Stderr. (#3554, #3567)
  • Go client, removed: CreateNamespaces, RemoteFDs, SetWindowSizeContainer (an attach resizes through its Resize channel), NewContext, VersionContext, NewConmonServerConfig, DialLongSocket, LogDriverTypeJSONLogger, the client loggers, the per command cgroup managers, the attach hooks and detach keys, FeatureSdNotify, FeatureJournaldFields, the config fields and errors of the removed features, ErrTerminalSizeNil and ErrMissingNetNsPath (an empty NetNsPath fails with ErrInvalidValue). The module no longer requires go.podman.io/storage. (#3551, #3554)
  • Go client, additions and behavior: ExecExitCodeUnknown names the exit code -1, a missing ServerRunDir or Runtime matches ErrInvalidValue, a call whose request cannot be sent because the connection ended matches ErrServerDisconnected, and a full socket backlog maps to ErrServerNotResponding in every call, not only in New. The client warns once when an older server ignores an IdleTimeout, and the logs of an attach carry the field container_id. The module requires Go 1.27.2. (#3528, #3544, #3567, #3579)
  • createNamespaces and startFdSocket fail with ... is not supported by this server, a set cleanupCmd, globalArgs, envVars, additionalFds, leakFds or sdnotifySocket, the json log driver and a tag or labels of a log driver with the <field> of <method> is not supported by this server, empty ones pass. The server no longer reports the sdnotify and journaldfields features, ignores the execSessionId of attachContainer and removes the conmon-fd.sock of an older server at its start. (#3551, #3567)
  • createContainer fails for an exit path or an OOM exit path which does not name a file, like / or one ending in .., / or /. (exit path "/" does not name a file), before only writing the file failed at the exit. createContainer and execSyncContainer reject a container ID with a control character with invalid container ID "...". A create or an exec fails if the runtime reports a PID which is not a child of the server, execSyncContainer with exit code -2. (#3561, #3581)
  • execSyncContainer returns at most 16 MiB less 64 KiB of output, stdout and stderr together (each took up to 16 MiB before), so that the response fits the 16 MiB gRPC messages of CRI-O and the kubelet. Exec commands reach the runtime after a --, so a command which starts with - cannot be taken for runtime options. (#3527, #3550)
  • Error texts: a runtime which could not be started reads spawn runtime <path>: ... instead of spawn child process: ..., a killed runtime runtime did not finish within <limit> instead of ... in time, an exec sync whose runtime did not start the process names its timeout, and a relative OOM exit path is an OOM exit path instead of an exit path. A failed runtime keeps the last 64 KiB of its stderr in the error instead of up to 16 MiB. (#3535, #3550, #3561, #3573, #3581)
  • A connection of a SPDY port forward ends 30 seconds after the client closed its side of the data stream if the pod did not close its side by then (CRI-O ends it after 1 second). That is a total, not an idle bound, an answer which still streams then gets cut. A HEAD request with SPDY upgrade headers gets a 405 instead of taking the session token. (#3542, #3581)
  • Shutdown: a container which ignores the forwarded SIGTERM delays the shutdown by the full 5 seconds, another SIGTERM, a SIGINT or a SIGQUIT ends the wait. Runtime calls which did not finish at the latest 7 of the 9.5 seconds after the signal get stopped and their runtimes and processes killed instead of left behind, the server then exits with status 1. (#3528, #3550)
  • Server log: the spans of requests and sessions show at every level, like create_container{container_id="<id>"}. The end of a streaming session moved from info to debug, a failed exec or session from error to warn, output dropped a while after the exit from debug to warn, and a successful execSyncContainer logs nothing at info. (#3581)
  • scripts/get downloads over HTTPS only, redirects included, and fails if the checksums of a release cannot be fetched, unless -k falls back to the bucket. (#3544, #3549)

Bug fixes

  • The server keeps a terminal open until the process exited, so an init system or a getty which closes the console and opens it again keeps its log and attach output (Linux 4.13 or later). (#3527)
  • Attach clients get the output which the log drivers still held when the container exited, for up to 5 seconds. Before, what the log did not take within 100 ms got cut off for them. (#3561)
  • A process which exits while traced, like one under strace, reports its exit code instead of -1, and the CRI logs get synced once the container exited, before the exit files get written, like conmon without --no-sync-log. (#3527, #3528)
  • A WebSocket client which closes first gets the close of the server in answer, before browsers reported code 1006 and the Python client waited in close(). The base64 channel protocols decode payloads like Go, with line breaks ignored, and a SPDY connection which breaks ends like one the client closed, without a warning about a protocol error. (#3528, #3581)
  • The server warns once when it cannot watch the memory events of a container, like with used up inotify limits, and reads the counters at most every 100 ms under memory pressure. (#3527, #3528)
  • A journal which recovered after a stall gets waited for again the next time it is busy, before its lines kept getting dropped without the wait. (#3581)
  • Idle containers hold less memory: a log file releases its buffer at the end of every chunk (16 to 32 KiB before), and the journald line buffers shrink above the read buffer size. (#3548, #3561)
  • Exit and OOM files get created with O_NOFOLLOW like the log files, a container registered after the shutdown began gets no exit file, and a child which its watcher reaped no longer claims its PID while its output gets finished. (#3553, #3561, #3581)
  • A server built without the tracing feature warns at its start about --enable-tracing (with a server log driver other than none), a stuck log driver produces one warning instead of two, and a failed log reopen gets logged. (#3543, #3581)

Build and release

  • The server no longer depends on async-channel, percent-encoding and the handshake feature of tokio-tungstenite, Cargo.lock has 13 crates less, and three unsafe blocks are gone. (#3534, #3582)
  • usage.md and most of the README moved into docs, usage.md stays as a stub which maps the old anchors. Every document ends with a list of changes per version, troubleshooting.md explains how to debug a pod, cri-o.md covers the streaming default of CRI-O v1.38, and the RPM ships docs instead of usage.md. (#3536, #3539, #3549, #3579, #3584)
  • CI skips the jobs which a pull request cannot affect, checks the Go API of the client with gorelease against the latest release (make verify-go-api) and the links of the Markdown files with lychee (make lint-links), and runs the fuzz jobs from a reusable fuzz.yml. (#3540, #3559, #3569)
  • CI verifies cargo-deny, golangci-lint and the nix install script by checksum and builds cargo-fuzz from its crate with --locked. Specs which got skipped without being expected to and panics printed by passed unit tests fail their jobs. (#3559, #3569, #3580)
  • The amd64 integration tests also run with runc (v1.5.3, with criu from nixpkgs for the checkpoint specs), crun is 1.31, and the critest jobs stay on CRI-O v1.37.2, the last 1.37 release which vendors a v1.0 client. CI uses Rust 1.100.0, zizmor 1.32.0 and grype 0.121.3. (#3533, #3549, #3558, #3577, #3580)
  • New tests for the gaps which mutation runs found, like attach, create and restore against a fake runtime, the OOM watcher and the shutdown, and the server got split into smaller modules with narrowed visibility, without behavior changes. (#3537, #3538, #3555, #3560, #3562, #3563, #3568, #3570, #3571, #3572)
  • Dependency updates: capnp-rpc, cc, crate-ci/typos, flate2, itoa, log, nixpkgs, sigstore/cosign-installer, smallvec, syn, taiki-e/install-action and the Go modules of the integration suite. (#3529, #3530, #3531, #3532, #3541, #3546, #3547, #3556, #3557, #3564, #3565, #3566, #3574, #3575, #3576, #3578, #3583)

Full Changelog: v1.2.2...v1.2.3