Repository navigation
·
92 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Highlights
createContainerrestores a container from a checkpoint if the request sets arestorePath(RestorePathin Go): the server runs therestorecommand of the runtime instead ofcreate, like conmon with--restore, and monitors the restored container like a created one. Servers report therestorefeature (FeatureRestore), the Go client fails withErrUnsupportedon older ones. CRI-O still has to restore through the client. (#3558, #3560)- The features which CRI-O does not use are removed: the
pausesubcommand withcreateNamespaces, the fd socket withstartFdSocket, the sd_notify relay, thejsonlog driver, cleanup commands, global arguments and environment variables of the runtime, and the journaldtagandlabels. 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, sojournalctl -t conmonrs -g <id>finds them. Atinfo, 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
execSyncContainerprocess 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-breaklists every incompatible change against v1.2.2):AttachConfigisAttachContainerConfig,ExecSyncConfigisExecSyncContainerConfig,ExecContainerResultisExecSyncContainerResult,CreateContainerResponseisCreateContainerResult, theTtyof the attach and serve exec configs isTerminal, andShutdownandKilltake a context and replaceShutdownContextandKillContext. (#3554, #3567) - Go client, changed types:
ExecSyncContainerConfig.Timeoutis atime.Duration, rounded up to whole seconds (a CRI timeout needstime.Duration(timeout) * time.Second, a negative one fails withErrInvalidValue).Version(ctx)takes no config and returns aVersionResult, theServerVersionplus the PID, without the cargo tree.AttachStreamstakes anio.ReadCloserandio.WriteClosers, andConmonServerConfigtakesTracingandHeaptrackas values and*os.FileforStdoutandStderr. (#3554, #3567) - Go client, removed:
CreateNamespaces,RemoteFDs,SetWindowSizeContainer(an attach resizes through itsResizechannel),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,ErrTerminalSizeNilandErrMissingNetNsPath(an emptyNetNsPathfails withErrInvalidValue). The module no longer requiresgo.podman.io/storage. (#3551, #3554) - Go client, additions and behavior:
ExecExitCodeUnknownnames the exit code -1, a missingServerRunDirorRuntimematchesErrInvalidValue, a call whose request cannot be sent because the connection ended matchesErrServerDisconnected, and a full socket backlog maps toErrServerNotRespondingin every call, not only inNew. The client warns once when an older server ignores anIdleTimeout, and the logs of an attach carry the fieldcontainer_id. The module requires Go 1.27.2. (#3528, #3544, #3567, #3579) createNamespacesandstartFdSocketfail with... is not supported by this server, a setcleanupCmd,globalArgs,envVars,additionalFds,leakFdsorsdnotifySocket, thejsonlog driver and atagorlabelsof a log driver withthe <field> of <method> is not supported by this server, empty ones pass. The server no longer reports thesdnotifyandjournaldfieldsfeatures, ignores theexecSessionIdofattachContainerand removes theconmon-fd.sockof an older server at its start. (#3551, #3567)createContainerfails 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.createContainerandexecSyncContainerreject a container ID with a control character withinvalid container ID "...". A create or an exec fails if the runtime reports a PID which is not a child of the server,execSyncContainerwith exit code -2. (#3561, #3581)execSyncContainerreturns 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 ofspawn child process: ..., a killed runtimeruntime 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 anOOM exit pathinstead of anexit 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 frominfotodebug, a failed exec or session fromerrortowarn, output dropped a while after the exit fromdebugtowarn, and a successfulexecSyncContainerlogs nothing atinfo. (#3581) scripts/getdownloads over HTTPS only, redirects included, and fails if the checksums of a release cannot be fetched, unless-kfalls 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_NOFOLLOWlike 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
tracingfeature warns at its start about--enable-tracing(with a server log driver other thannone), 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-encodingand thehandshakefeature oftokio-tungstenite,Cargo.lockhas 13 crates less, and three unsafe blocks are gone. (#3534, #3582) usage.mdand most of the README moved intodocs,usage.mdstays 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 shipsdocsinstead ofusage.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 reusablefuzz.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