From 0e0d29d2286cbc43039bdd136f9573c455c7bea0 Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Tue, 18 Apr 2023 23:01:30 +0800 Subject: [PATCH 1/3] agent: Fix ut issue caused by fd double closed Never ever try to close the same fd double times, even in a unit test. A file descriptor is a number which will be reused, so when you close the same number twice you may close another file descriptor in the second time and then there will be an error 'Bad file descriptor (os error 9)' while the wrongly closed fd is being used. Fixes: #6679 Signed-off-by: Tim Zhang (cherry picked from commit 53c749a9de89ead493a91f823d580c6cec9125e0) --- src/agent/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/agent/src/main.rs b/src/agent/src/main.rs index d8e9fc828..18c408a27 100644 --- a/src/agent/src/main.rs +++ b/src/agent/src/main.rs @@ -436,9 +436,8 @@ mod tests { let msg = format!("test[{}]: {:?}", i, d); let (rfd, wfd) = unistd::pipe2(OFlag::O_CLOEXEC).unwrap(); defer!({ - // rfd is closed by the use of PipeStream in the crate_logger_task function, - // but we will attempt to close in case of a failure - let _ = unistd::close(rfd); + // XXX: Never try to close rfd, because it will be closed by PipeStream in + // create_logger_task() and it's not safe to close the same fd twice time. unistd::close(wfd).unwrap(); }); From 2ff6964be8939ce8e19cf65c998e8d9300ae24d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 12 May 2023 14:40:21 +0200 Subject: [PATCH 2/3] release: Adapt kata-deploy for 3.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kata-deploy files must be adapted to a new release. The cases where it happens are when the release goes from -> to: * main -> stable: * kata-deploy-stable / kata-cleanup-stable: are removed * stable -> stable: * kata-deploy / kata-cleanup: bump the release to the new one. There are no changes when doing an alpha release, as the files on the "main" branch always point to the "latest" and "stable" tags. Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml | 2 +- tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml b/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml index c273f8bea..8456f8844 100644 --- a/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml +++ b/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml @@ -18,7 +18,7 @@ spec: katacontainers.io/kata-runtime: cleanup containers: - name: kube-kata-cleanup - image: quay.io/kata-containers/kata-deploy:3.1.0 + image: quay.io/kata-containers/kata-deploy:3.1.1 imagePullPolicy: Always command: [ "bash", "-c", "/opt/kata-artifacts/scripts/kata-deploy.sh reset" ] env: diff --git a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml index e1a1d49eb..1d6a5a36b 100644 --- a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml +++ b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml @@ -16,7 +16,7 @@ spec: serviceAccountName: kata-label-node containers: - name: kube-kata - image: quay.io/kata-containers/kata-deploy:3.1.0 + image: quay.io/kata-containers/kata-deploy:3.1.1 imagePullPolicy: Always lifecycle: preStop: From 36b8831801ffc3e63d5c6231c49bd0ed269493c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 12 May 2023 14:40:21 +0200 Subject: [PATCH 3/3] release: Kata Containers 3.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - osbuilder: Fix D-Bus enabling in the dracut case (backport for 3.1) - osbuilder: Enable dbus in the dracut case (backport for 3.1) - backport: Don't create socket file in /run/kata to 3.1 - Backport cgroup fixes to 3.1 - agent: Fix ut issue caused by fd double closed dd3993225 release: Adapt kata-deploy for 3.1.1 8db3dfb30 osbuilder: Fix D-Bus enabling in the dracut case 1de0909a3 osbuilder: Enable dbus in the dracut case a86feb8bf runtime: Don't create socket file in /run/kata 8b597195a rustjail: Use CPUWeight with systemd and CgroupsV2 f83adbe83 rustjail: Add anyhow context for D-Bus connections e0e6f9481 rustjail: Fix minor grammatical error in function name ecadb514e rustjail: Do not unwrap potential error with cgroup manager Signed-off-by: Fabiano FidĂȘncio --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index fd2a01863..94ff29cc4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.0 +3.1.1