fix invalid syntax of /etc/sysctl.conf after executing init os script
Signed-off-by: chenmaodong <chenmaodong@xfusion.com>
This commit is contained in:
parent
44a72a79e5
commit
69cc390fc9
27
backport-0001-fix-invalid-syntax-of-etc_sysctl_conf.patch
Normal file
27
backport-0001-fix-invalid-syntax-of-etc_sysctl_conf.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From fbd73b6c14fc9db366e68b60c9a189019777fc20 Mon Sep 17 00:00:00 2001
|
||||||
|
From: faror <hung.z.h916@gmail.com>
|
||||||
|
Date: Fri, 19 Aug 2022 11:31:36 +0800
|
||||||
|
Subject: [PATCH] fixed #1453
|
||||||
|
|
||||||
|
---
|
||||||
|
pkg/bootstrap/os/templates/init_script.go | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pkg/bootstrap/os/templates/init_script.go b/pkg/bootstrap/os/templates/init_script.go
|
||||||
|
index 289d2577..fd0ffe10 100644
|
||||||
|
--- a/pkg/bootstrap/os/templates/init_script.go
|
||||||
|
+++ b/pkg/bootstrap/os/templates/init_script.go
|
||||||
|
@@ -83,7 +83,9 @@ sed -r -i "s@#{0,}?vm.swappiness ?= ?([0-9]{1,})@vm.swappiness = 1@g" /etc/sysc
|
||||||
|
sed -r -i "s@#{0,}?fs.inotify.max_user_instances ?= ?([0-9]{1,})@fs.inotify.max_user_instances = 524288@g" /etc/sysctl.conf
|
||||||
|
sed -r -i "s@#{0,}?kernel.pid_max ?= ?([0-9]{1,})@kernel.pid_max = 65535@g" /etc/sysctl.conf
|
||||||
|
|
||||||
|
-awk ' !x[$0]++{print > "/etc/sysctl.conf"}' /etc/sysctl.conf
|
||||||
|
+tmpfile="$$.tmp"
|
||||||
|
+awk ' !x[$0]++{print > "'$tmpfile'"}' /etc/sysctl.conf
|
||||||
|
+mv $tmpfile /etc/sysctl.conf
|
||||||
|
|
||||||
|
systemctl stop firewalld 1>/dev/null 2>/dev/null
|
||||||
|
systemctl disable firewalld 1>/dev/null 2>/dev/null
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
||||||
@ -3,11 +3,12 @@
|
|||||||
Name: kubekey
|
Name: kubekey
|
||||||
Summary: Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA.
|
Summary: Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA.
|
||||||
Version: v2.2.2
|
Version: v2.2.2
|
||||||
Release: 1
|
Release: 2
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/kubesphere/kubekey
|
URL: https://github.com/kubesphere/kubekey
|
||||||
|
|
||||||
Source0: https://github.com/kubesphere/kubekey/releases/download/%{version}-openEuler/kubekey-%{version}.tar.gz
|
Source0: https://github.com/kubesphere/kubekey/releases/download/%{version}-openEuler/kubekey-%{version}.tar.gz
|
||||||
|
Patch0001: backport-0001-fix-invalid-syntax-of-etc_sysctl_conf.patch
|
||||||
|
|
||||||
BuildRequires: git go
|
BuildRequires: git go
|
||||||
Requires: socat
|
Requires: socat
|
||||||
@ -18,8 +19,7 @@ Requires: conntrack
|
|||||||
Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA.
|
Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
%setup
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
bash -x build.sh -p
|
bash -x build.sh -p
|
||||||
@ -33,6 +33,9 @@ cp output/kk $RPM_BUILD_ROOT/usr/local/bin
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 29 2022 chenmaodong <chenmaodong@xfusion.com> v2.2.2-2
|
||||||
|
- fix invalid syntax of /etc/sysctl.conf after executing init os script
|
||||||
|
|
||||||
* Mon Aug 8 2022 guofeng <guofeng@yunify.com> v2.2.2-1
|
* Mon Aug 8 2022 guofeng <guofeng@yunify.com> v2.2.2-1
|
||||||
- update to latest version v2.2.2
|
- update to latest version v2.2.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user