From 341a0d366c3667659cb7336ed8e9b493e04abf5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sun, 10 May 2026 09:41:40 +0200 Subject: [PATCH] kata-deploy: Fix containerd debug level path for config schema v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Containerd 2.3 (config schema v4) uses the top-level [debug] table for log level configuration, not plugins."io.containerd.server.v1.debug" as was the case in the RC builds. Update containerd_debug_level_toml_path() to use .debug.level for all schema versions, matching the released containerd behavior. Signed-off-by: Fabiano FidĂȘncio --- .../binary/src/runtime/containerd.rs | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/tools/packaging/kata-deploy/binary/src/runtime/containerd.rs b/tools/packaging/kata-deploy/binary/src/runtime/containerd.rs index a1c4e78022..9bfa3ff1c7 100644 --- a/tools/packaging/kata-deploy/binary/src/runtime/containerd.rs +++ b/tools/packaging/kata-deploy/binary/src/runtime/containerd.rs @@ -81,13 +81,11 @@ fn containerd_config_schema_version(paths: &ContainerdPaths, runtime: &str) -> O schema_version_relaxed(&paths.config_file, runtime) } -/// TOML path for containerd log level when DEBUG=true. Config schema v4+ uses -/// `plugins."io.containerd.server.v1.debug"` instead of deprecated top-level `[debug]`. -fn containerd_debug_level_toml_path(config_schema_version: Option) -> &'static str { - match config_schema_version { - Some(v) if v >= 4 => concat!(".plugins.", "\"io.containerd.server.v1.debug\"", ".level"), - _ => ".debug.level", - } +/// TOML path for containerd log level when DEBUG=true. +/// All released containerd config schema versions (including v4) use the +/// top-level `[debug]` table with `level`, `format`, and `log_trace_id` keys. +fn containerd_debug_level_toml_path(_config_schema_version: Option) -> &'static str { + ".debug.level" } /// Reads config and returns the CRI plugin ID used for *runtime* config (runtimes, snapshotter-per-runtime). @@ -692,14 +690,7 @@ mod tests { #[test] fn test_containerd_debug_level_toml_path_by_schema_version() { - assert_eq!( - containerd_debug_level_toml_path(Some(4)), - ".plugins.\"io.containerd.server.v1.debug\".level" - ); - assert_eq!( - containerd_debug_level_toml_path(Some(5)), - ".plugins.\"io.containerd.server.v1.debug\".level" - ); + assert_eq!(containerd_debug_level_toml_path(Some(4)), ".debug.level"); assert_eq!(containerd_debug_level_toml_path(Some(3)), ".debug.level"); assert_eq!(containerd_debug_level_toml_path(None), ".debug.level"); }