From 1ff6cee49a15575b1fbea75ebdd230acfe17baab Mon Sep 17 00:00:00 2001 From: jikui Date: Tue, 16 Nov 2021 16:13:47 +0800 Subject: [PATCH] kata-runtime: keep the qemu process name same as the configured path Signed-off-by: jikui --- kata-containers.spec | 8 ++- ...p-the-process-name-of-qemu-same-as-c.patch | 52 +++++++++++++++++++ series.conf | 1 + 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 patches/0011-kata-containers-keep-the-process-name-of-qemu-same-as-c.patch diff --git a/kata-containers.spec b/kata-containers.spec index e7b2e01..6bcca44 100644 --- a/kata-containers.spec +++ b/kata-containers.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} %define VERSION 2.1.0 -%define RELEASE 7 +%define RELEASE 8 Name: kata-containers Version: %{VERSION} @@ -108,6 +108,12 @@ strip %{buildroot}/usr/bin/containerd-shim-kata-v2 %doc %changelog +* Tue Oct 16 2021 jikui - 2.1.0-8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:keep the qemu process name same as the configured path + * Mon Oct 15 2021 jikui - 2.1.0-7 - Type:bugfix - ID:NA diff --git a/patches/0011-kata-containers-keep-the-process-name-of-qemu-same-as-c.patch b/patches/0011-kata-containers-keep-the-process-name-of-qemu-same-as-c.patch new file mode 100644 index 0000000..159b784 --- /dev/null +++ b/patches/0011-kata-containers-keep-the-process-name-of-qemu-same-as-c.patch @@ -0,0 +1,52 @@ +From 0797bf1fec9c40b67f2770bc8778e8eaee1657c8 Mon Sep 17 00:00:00 2001 +From: jikui +Date: Fri, 5 Nov 2021 11:35:25 +0800 +Subject: [PATCH 3/8] kata-runtime: keep the process name of qemu same as + configured path + +Signed-off-by: jikui +--- + src/runtime/pkg/katautils/config.go | 7 ++++++- + src/runtime/pkg/katautils/config_test.go | 4 ++-- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/runtime/pkg/katautils/config.go b/src/runtime/pkg/katautils/config.go +index 718677b..e0ebc84 100644 +--- a/src/runtime/pkg/katautils/config.go ++++ b/src/runtime/pkg/katautils/config.go +@@ -172,7 +172,12 @@ func (h hypervisor) path() (string, error) { + p = defaultHypervisorPath + } + +- return ResolvePath(p) ++ absolutePath, err := filepath.Abs(p) ++ if err != nil { ++ return "", err ++ } ++ ++ return absolutePath, nil + } + + func (h hypervisor) ctlpath() (string, error) { +diff --git a/src/runtime/pkg/katautils/config_test.go b/src/runtime/pkg/katautils/config_test.go +index 0d02534..84b7843 100644 +--- a/src/runtime/pkg/katautils/config_test.go ++++ b/src/runtime/pkg/katautils/config_test.go +@@ -983,12 +983,12 @@ func TestHypervisorDefaultsHypervisor(t *testing.T) { + assert.NoError(err) + assert.Equal(p, defaultHypervisorPath, "default hypervisor path wrong") + +- // test path resolution ++ // test path resolution, just return the absolute path instead of resolved path + defaultHypervisorPath = testHypervisorLinkPath + h = hypervisor{} + p, err = h.path() + assert.NoError(err) +- assert.Equal(p, testHypervisorPath) ++ assert.Equal(p, testHypervisorLinkPath) + } + + func TestHypervisorDefaultsKernel(t *testing.T) { +-- +2.25.1 + diff --git a/series.conf b/series.conf index 00b0519..6d44840 100644 --- a/series.conf +++ b/series.conf @@ -8,3 +8,4 @@ 0008-kata-containers-adpat-with-iSulad.patch 0009-kata-containers-fix-kata-runtime-hungs-when-qemu-proces.patch 0010-kata-containers-fix-kata-runtime-skip-read-lines-in-pro.patch +0011-kata-containers-keep-the-process-name-of-qemu-same-as-c.patch -- Gitee