kata-runtime: fix the problem that sandbox stratovirt with network devices fails to start

Signed-off-by: Lichang Zhao <zhaolichang@huawei.com>
This commit is contained in:
Lichang Zhao 2021-12-17 17:12:00 +08:00
parent 56fe247c31
commit f26e86cd92
4 changed files with 42 additions and 2 deletions

View File

@ -2,7 +2,7 @@
%global debug_package %{nil}
%define VERSION v1.11.1
%define RELEASE 12
%define RELEASE 13
Name: kata-containers
Version: %{VERSION}
@ -92,6 +92,12 @@ install -p -m 640 -D ./runtime/cli/config/configuration-qemu.toml %{buildroot}/u
%changelog
* Fri Dec 17 2021 Lichang Zhao<zhaolichang@huawei.com> - 1.11.1-13
+- Type:bugfix
+- ID:NA
+- SUG:NA
+- DESC:fix the problem that sandbox stratovirt with network devices fails to start
* Fri Dec 17 2021 yangfeiyu <yangfeiyu2@huawei.com> - 1.11.1-12
- Type:bugfix
- ID:NA

View File

@ -1,7 +1,7 @@
%define debug_package %{nil}
%define VERSION 1.11.1
%define RELEASE 12
%define RELEASE 13
Name: kata-runtime
Version: %{VERSION}
@ -98,6 +98,12 @@ install -p -m 640 ./cli/config/configuration-qemu.toml %{buildroot}/usr/share/de
/usr/share/defaults/kata-containers/configuration.toml
%changelog
* Fri Dec 17 2021 Lichang Zhao<zhaolichang@huawei.com> - 1.11.1-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix the problem that sandbox stratovirt with network devices fails to start
* Sat Nov 27 2021 yangfeiyu<yangfeiyu20102011@163.com> - 1.11.1-12
- Type:enhancement
- ID:NA

View File

@ -0,0 +1,27 @@
From fa77503ed5ad7c95ba1ec49a00341379320f53b9 Mon Sep 17 00:00:00 2001
From: Lichang Zhao <zhaolichang@huawei.com>
Date: Fri, 17 Dec 2021 16:49:03 +0800
Subject: [PATCH] kata-runtime: fix the problem that sandbox stratovirt with
network devices fails to start
Signed-off-by: Lichang Zhao <zhaolichang@huawei.com>
---
runtime/virtcontainers/stratovirt.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtcontainers/stratovirt.go b/runtime/virtcontainers/stratovirt.go
index 415718f..acf4cbf 100644
--- a/virtcontainers/stratovirt.go
+++ b/virtcontainers/stratovirt.go
@@ -158,7 +158,7 @@ func (s *stratovirt) startSandbox(timeout int) error {
name := v.Name()
mac := v.HardwareAddr()
tapName := v.NetworkPair().TapInterface.TAPIface.Name
- params = append(params, "-net", fmt.Sprintf("id=%s,mac=%s,host_dev_name=%s", name, mac, tapName))
+ params = append(params, "-netdev", fmt.Sprintf("id=%s,mac=%s,netdev=%s", name, mac, tapName))
case config.BlockDrive:
id := v.ID
path := v.File
--
2.27.0

View File

@ -73,3 +73,4 @@
0073-write-exit-code-in-integer-byte-order.patch
0074-add-timeout-for-grpcWaitProcessRequest.patch
0075-move-waitProcess-timeout-to-stop-process.patch
0076-kata-runtime-fix-the-problem-that-sandbox-stratovirt.patch