From 407f76b4e0432af6dd4dfbd8c5584fc42bd7cf64 Mon Sep 17 00:00:00 2001 From: rabbitali Date: Fri, 9 Jun 2023 17:49:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E4=BC=A0=E5=85=A5au?= =?UTF-8?q?toreboot=20=E8=BF=9B=E8=A1=8CCVE=E4=BF=AE=E5=A4=8D=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=9B=E5=BB=BA=E6=97=B6=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=94=E5=9B=9E500=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 181b32d98c47a1b2cd5dc4caae870178b58ef8f2) --- ...500-when-request-without-auto-reboot.patch | 27 +++++++++++++++++++ aops-apollo.spec | 7 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0009-cve-fix-task-generate-api-return-500-when-request-without-auto-reboot.patch diff --git a/0009-cve-fix-task-generate-api-return-500-when-request-without-auto-reboot.patch b/0009-cve-fix-task-generate-api-return-500-when-request-without-auto-reboot.patch new file mode 100644 index 0000000..bfbbaea --- /dev/null +++ b/0009-cve-fix-task-generate-api-return-500-when-request-without-auto-reboot.patch @@ -0,0 +1,27 @@ +From f54492ae8e957888bb10e8947904490c95e47f48 Mon Sep 17 00:00:00 2001 +From: rabbitali +Date: Fri, 9 Jun 2023 17:19:52 +0800 +Subject: [PATCH ] fix bug: API return 500 when create cve fix task without parameter auto_reboot +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + apollo/function/schema/task.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/apollo/function/schema/task.py b/apollo/function/schema/task.py +index 5e8744b..ec6315e 100644 +--- a/apollo/function/schema/task.py ++++ b/apollo/function/schema/task.py +@@ -88,7 +88,7 @@ class GenerateCveTaskSchema(Schema): + task_name = fields.String(required=True, validate=lambda s: len(s) != 0) + description = fields.String( + required=True, validate=lambda s: 0 < len(s) <= 50) +- auto_reboot = fields.Boolean(required=False, default=False) ++ auto_reboot = fields.Boolean(required=True, default=False) + accepted = fields.Boolean(required=True, validate=validate.OneOf([True, False])) + check_items = fields.String(required=False, validate=lambda s: 0 < len(s) <= 32) + info = fields.List(fields.Nested(CveInfoDictSchema), required=True, validate=lambda s: len(s) > 0) +-- + diff --git a/aops-apollo.spec b/aops-apollo.spec index 3607b40..051fe97 100644 --- a/aops-apollo.spec +++ b/aops-apollo.spec @@ -1,6 +1,6 @@ Name: aops-apollo Version: v1.2.1 -Release: 4 +Release: 5 Summary: Cve management service, monitor machine vulnerabilities and provide fix functions. License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} @@ -13,6 +13,8 @@ Patch0005: 0005-fix-generate-task-is-not-verified-host-and-cve.patch Patch0006: 0006-update-hotpatch-status-related-operation-support.patch Patch0007: 0007-fix-hotpatch-status-filter-exception.patch Patch0008: 0008-update-validation-rules-for-paging-parameters.patch +Patch0009: 0009-cve-fix-task-generate-api-return-500-when-request-without-auto-reboot.patch + BuildRequires: python3-setuptools Requires: aops-vulcanus >= v1.2.0 @@ -83,6 +85,9 @@ cp -r hotpatch %{buildroot}/%{python3_sitelib}/dnf-plugins/ %{python3_sitelib}/aops_apollo_tool/* %changelog +* Fri Jun 09 2023 wenxin - v1.2.1-5 +- fix issue: API return 500 when create cve fix task without parameter auto_reboot + * Thu Jun 08 2023 wenxin - v1.2.1-4 - fix issue: hotpatch status filter exception - update validation rules for paging parameters -- Gitee