diff --git a/0023-KubeOS-fix-proxy-upgrade-requeue-bug.patch b/0023-KubeOS-fix-proxy-upgrade-requeue-bug.patch new file mode 100644 index 0000000000000000000000000000000000000000..ae72d14cb5877788499cd6b7b765976b5296e6ac --- /dev/null +++ b/0023-KubeOS-fix-proxy-upgrade-requeue-bug.patch @@ -0,0 +1,28 @@ +From 9a92903712509e32b9ea84f97e35c50b2152389d Mon Sep 17 00:00:00 2001 +From: Yuhang Wei +Date: Tue, 5 Sep 2023 12:38:18 +0800 +Subject: [PATCH 1/3] KubeOS: fix proxy upgrade requeue bug + +fix the bug that proxy doesnt forget ratelimit after updating config + +Signed-off-by: Yuhang Wei +--- + cmd/proxy/controllers/os_controller.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmd/proxy/controllers/os_controller.go b/cmd/proxy/controllers/os_controller.go +index d7da343..1153419 100644 +--- a/cmd/proxy/controllers/os_controller.go ++++ b/cmd/proxy/controllers/os_controller.go +@@ -101,7 +101,7 @@ func (r *OSReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Re + if err = r.Update(ctx, osInstance); err != nil { + return values.RequeueNow, err + } +- return values.RequeueNow, nil ++ return values.Requeue, nil + } + if err := r.setConfig(ctx, osInstance, values.SysConfigName); err != nil { + return values.RequeueNow, err +-- +2.34.1 + diff --git a/0024-KubeOS-fix-label-changed-after-upgrade.patch b/0024-KubeOS-fix-label-changed-after-upgrade.patch new file mode 100644 index 0000000000000000000000000000000000000000..6003b1d74e100c1f37459e26db1de2c53798ffdd --- /dev/null +++ b/0024-KubeOS-fix-label-changed-after-upgrade.patch @@ -0,0 +1,40 @@ +From 5fce81aeda6498425772d3af2bfa858ba8923140 Mon Sep 17 00:00:00 2001 +From: Yuhang Wei +Date: Tue, 5 Sep 2023 17:01:41 +0800 +Subject: [PATCH 2/3] KubeOS: fix label changed after upgrade + +When upgrading, the label of the new root partition are changed to the original disk information + +Signed-off-by: Yuhang Wei +--- + cmd/agent/server/utils.go | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/cmd/agent/server/utils.go b/cmd/agent/server/utils.go +index d2d0946..b4a19ff 100644 +--- a/cmd/agent/server/utils.go ++++ b/cmd/agent/server/utils.go +@@ -75,6 +75,9 @@ func deleteNewline(out string) string { + } + + func install(imagePath string, side string, next string) error { ++ if err := modifyImageLabel(imagePath, side, next); err != nil { ++ return err ++ } + if err := runCommand("dd", "if="+imagePath, "of="+side, "bs=8M"); err != nil { + return err + } +@@ -370,3 +373,10 @@ func getOCIImageDigest(containerRuntime string, imageName string) (string, error + } + return imageDigests, nil + } ++ ++func modifyImageLabel(imagePath, side, next string) error { ++ if err := runCommand("e2label", imagePath, "ROOT-"+next); err != nil { ++ return err ++ } ++ return nil ++} +-- +2.34.1 + diff --git a/KubeOS.spec b/KubeOS.spec index b992901cecd335035c67db7f8ef06114ec530d39..9b457d3ac8789ecc29e953b40c9afe5bf9615089 100644 --- a/KubeOS.spec +++ b/KubeOS.spec @@ -2,7 +2,7 @@ Name: KubeOS Version: 1.0.4 -Release: 3 +Release: 4 Summary: O&M platform used to update the whole OS as an entirety License: Mulan PSL v2 Source0: https://gitee.com/openeuler/KubeOS/repository/archive/v%{version}.tar.gz @@ -28,6 +28,8 @@ Patch19: 0019-KubeOS-add-unit-tests.patch Patch20: 0020-KubeOS-modify-code-for-clean-code.patch Patch21: 0021-KubeOS-delete-raw-and-docker-image-upgrade.patch Patch22: 0022-KubeOS-delete-scripts-except-admin-container.patch +Patch23: 0023-KubeOS-fix-proxy-upgrade-requeue-bug.patch +Patch24: 0024-KubeOS-fix-label-changed-after-upgrade.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: make @@ -104,6 +106,12 @@ install -p -m 0600 ./scripts/admin-container/set-ssh-pub-key.service %{buildroot rm -rfv %{buildroot} %changelog +* Tue Sep 05 2023 Yuhang Wei - 1.0.4-4 +- Type:requirement +- CVE:NA +- SUG:restart +- DESC:fix proxy requeue and update image label + * Thu Aug 24 2023 Yuhang Wei - 1.0.4-3 - Type:requirement - CVE:NA @@ -194,7 +202,7 @@ rm -rfv %{buildroot} - SUG:restart - DESC:fix bugs of checks in generate.sh and change module path -* Fri Oct 30 2021 liyuanrong - 1.0.1-2 +* Sat Oct 30 2021 liyuanrong - 1.0.1-2 - Type:requirement - CVE:NA - SUG:restart