From d3e0ecc394e9d92e76a878a75d22eaf93f3451ff Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Wed, 29 Jan 2025 10:21:55 +0000 Subject: [PATCH 1/4] kata-ctl: Allow empty const Due to the way that multi-arch support is done, on various platforms we will get a clippy error: ``` error: this expression always evaluates to false ``` which might not be true on those other platforms, so allow this code pattern to suppress the clippy error Signed-off-by: stevenhorsman --- src/tools/kata-ctl/src/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/kata-ctl/src/utils.rs b/src/tools/kata-ctl/src/utils.rs index 44865d65f9..644ed2b72f 100644 --- a/src/tools/kata-ctl/src/utils.rs +++ b/src/tools/kata-ctl/src/utils.rs @@ -111,6 +111,7 @@ pub fn get_distro_details(os_release: &str, os_release_clr: &str) -> Result<(Str target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"), ))] +#[allow(clippy::const_is_empty)] pub fn get_generic_cpu_details(cpu_info_file: &str) -> Result<(String, String)> { let cpu_info = kata_sys_util::cpu::get_single_cpu_info(cpu_info_file, "\n\n")?; let lines = cpu_info.lines(); From 76df852f33498e4881220ceb3bade42eb637c822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 27 Jan 2025 21:44:49 +0100 Subject: [PATCH 2/4] packaging: agent: Add rust version to the builder image name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As we want to make sure a new builder image is generated if the rust version is bumped. Signed-off-by: Fabiano FidĂȘncio Signed-off-by: stevenhorsman --- tools/packaging/scripts/lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/packaging/scripts/lib.sh b/tools/packaging/scripts/lib.sh index f5ba3624b6..a5b81e632b 100644 --- a/tools/packaging/scripts/lib.sh +++ b/tools/packaging/scripts/lib.sh @@ -230,8 +230,9 @@ get_agent_image_name() { "$(get_last_modification "${repo_root_dir}/ci/install_libseccomp.sh")" \ "$(get_last_modification "${repo_root_dir}/tools/packaging/kata-deploy/local-build/kata-deploy-copy-libseccomp-installer.sh")") agent_dir="${repo_root_dir}/tools/packaging/static-build/agent" + rust_toolchain="$(get_from_kata_deps ".languages.rust.meta.newest-version")" - echo "${BUILDER_REGISTRY}:agent-${libseccomp_hash}-$(get_last_modification ${agent_dir})-$(uname -m)" + echo "${BUILDER_REGISTRY}:agent-${libseccomp_hash}-$(get_last_modification ${agent_dir})-${rust_toolchain}-$(uname -m)" } get_coco_guest_components_image_name() { From 2ceb7a35fcce220dc1d8e3c57ce973bc704bceee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 27 Jan 2025 21:34:35 +0100 Subject: [PATCH 3/4] versions: Bump rust to 1.80.0 (matching coco-guest-components) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is needed in order to avoid agent build issues, such as: ``` error[E0658]: use of unstable library feature 'lazy_cell' --> /home/ansible/.cargo/git/checkouts/guest-components-1e54b222ad8d9630/514c561/ocicrypt-rs/src/lib.rs:10:5 | 10 | use std::sync::LazyLock; | ^^^^^^^^^^^^^^^^^^^ | = note: see issue #109736 for more information ``` Signed-off-by: Fabiano FidĂȘncio Signed-off-by: stevenhorsman --- versions.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions.yaml b/versions.yaml index 46394bec2b..20c647fcad 100644 --- a/versions.yaml +++ b/versions.yaml @@ -379,12 +379,12 @@ languages: rust: description: "Rust language" notes: "'version' is the default minimum version used by this project." - version: "1.75.0" + version: "1.80.0" meta: description: | 'newest-version' is the latest version known to work when building Kata - newest-version: "1.75.0" + newest-version: "1.80.0" golangci-lint: description: "golangci-lint" From fce49d420666af3dc26c40e01299928630083ac8 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Thu, 30 Jan 2025 17:50:48 +0000 Subject: [PATCH 4/4] dragonball: Skip unsafe tests Skip tests that use unsafe uses of file descriptor which causes ``` fatal runtime error: IO Safety violation: owned file descriptor already closed ``` See #10821 Signed-off-by: stevenhorsman --- src/dragonball/src/dbs_legacy_devices/src/i8042.rs | 1 + src/dragonball/src/dbs_utils/src/net/tap.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/dragonball/src/dbs_legacy_devices/src/i8042.rs b/src/dragonball/src/dbs_legacy_devices/src/i8042.rs index 53f8f8574e..4ce9cc5cf7 100644 --- a/src/dragonball/src/dbs_legacy_devices/src/i8042.rs +++ b/src/dragonball/src/dbs_legacy_devices/src/i8042.rs @@ -123,6 +123,7 @@ mod tests { } #[test] + #[ignore = "Issue #10821 - IO Safety violation: owned file descriptor already closed"] fn test_i8042_reset_err() { let reset_evt = EventFdTrigger::new(unsafe { EventFd::from_raw_fd(i32::MAX) }); let mut i8042 = I8042Device::new(reset_evt); diff --git a/src/dragonball/src/dbs_utils/src/net/tap.rs b/src/dragonball/src/dbs_utils/src/net/tap.rs index 012cce4942..7234a59c3a 100644 --- a/src/dragonball/src/dbs_utils/src/net/tap.rs +++ b/src/dragonball/src/dbs_utils/src/net/tap.rs @@ -431,6 +431,7 @@ mod tests { } #[test] + #[ignore = "Issue #10821 - IO Safety violation: owned file descriptor already closed"] fn test_set_options() { // This line will fail to provide an initialized FD if the test is not run as root. let tap = Tap::new().unwrap();