From 66ba0ab4d48dc0956f14492096268213b67a540c Mon Sep 17 00:00:00 2001 From: holyfei Date: Sun, 1 Nov 2020 21:10:53 +0800 Subject: [PATCH] kata_integration: disable kata-network netmon by default reason: disable kata-network netmon components by default, user can enable it by modifying the configuration.toml file. Signed-off-by: holyfei --- apply-patches | 19 ++++++++++ ...containers-disable-netmon-by-default.patch | 35 +++++++++++++++++++ series.conf | 1 + 3 files changed, 55 insertions(+) create mode 100755 apply-patches create mode 100644 patches/0001-kata-containers-disable-netmon-by-default.patch create mode 100644 series.conf diff --git a/apply-patches b/apply-patches new file mode 100755 index 0000000..9df8e8d --- /dev/null +++ b/apply-patches @@ -0,0 +1,19 @@ +#!/bin/bash + +if [[ -f ./patch_flag ]];then + echo "kata_integration patched!" + exit 0 +fi + +tar -zxvf kata_integration-*.tar.gz +cat ./series.conf | while read line +do + if [[ $line == '' || $line =~ ^\s*# ]]; then + continue + fi + echo "====patch $line======" + pwd + patch -p1 -F1 -s < ./patches/$line +done + +touch ./patch_flag diff --git a/patches/0001-kata-containers-disable-netmon-by-default.patch b/patches/0001-kata-containers-disable-netmon-by-default.patch new file mode 100644 index 0000000..f45b846 --- /dev/null +++ b/patches/0001-kata-containers-disable-netmon-by-default.patch @@ -0,0 +1,35 @@ +From 553338441418935cfe76db0c90a8fa58f12cfa37 Mon Sep 17 00:00:00 2001 +From: holyfei +Date: Sun, 1 Nov 2020 21:03:25 +0800 +Subject: [PATCH] kata-containers: disable netmon by default + +reason: disable netmon by default, user can modify the +enable_netmon config to enable netmon components. + +Signed-off-by: holyfei +--- + scripts/make_default_configuration.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/scripts/make_default_configuration.sh b/scripts/make_default_configuration.sh +index 1cd5d61..c998c46 100755 +--- a/scripts/make_default_configuration.sh ++++ b/scripts/make_default_configuration.sh +@@ -27,13 +27,12 @@ sed -i 's/^#enable_blk_mount/enable_blk_mount/' $KATA_CONFIG_PATH + sed -i 's#/usr/libexec/kata-containers/kata-proxy#/usr/bin/kata-proxy#' $KATA_CONFIG_PATH + sed -i 's#/usr/libexec/kata-containers/kata-shim#/usr/bin/kata-shim#' $KATA_CONFIG_PATH + sed -i 's#/usr/libexec/kata-containers/kata-netmon#/usr/bin/kata-netmon#' $KATA_CONFIG_PATH +-sed -i 's/^#enable_netmon/enable_netmon/' $KATA_CONFIG_PATH + sed -i 's/^#disable_new_netns/disable_new_netns/' $KATA_CONFIG_PATH + sed -i 's/^#disable_vhost_net/disable_vhost_net/' $KATA_CONFIG_PATH + sed -i 's/^#block_device_cache_set/block_device_cache_set/' $KATA_CONFIG_PATH + sed -i 's/^#block_device_cache_direct/block_device_cache_direct/' $KATA_CONFIG_PATH + sed -i 's#path = \"/usr/bin/qemu-.*\"#path = \"/usr/bin/qemu-kvm\"#' $KATA_CONFIG_PATH +-sed -i 's/^internetworking_model.*$/internetworking_model=\"bridged\"/' $KATA_CONFIG_PATH ++sed -i 's/^internetworking_model.*$/internetworking_model = \"none\"/' $KATA_CONFIG_PATH + + if [ "$ARCH" == "aarch64" ];then + sed -i 's/^machine_type.*$/machine_type = \"virt\"/' $KATA_CONFIG_PATH +-- +2.11.0 + diff --git a/series.conf b/series.conf new file mode 100644 index 0000000..d31db34 --- /dev/null +++ b/series.conf @@ -0,0 +1 @@ +0001-kata-containers-disable-netmon-by-default.patch -- Gitee