diff --git a/0005-add-specific-error-information.patch b/0005-add-specific-error-information.patch new file mode 100644 index 0000000000000000000000000000000000000000..bd71e0d5f3808f60f13657253431fda19935b1ed --- /dev/null +++ b/0005-add-specific-error-information.patch @@ -0,0 +1,82 @@ +From 5b0551698b60ea0c01ad9ee223f7009f230caa12 Mon Sep 17 00:00:00 2001 +From: wang-guangge +Date: Mon, 20 Nov 2023 20:51:57 +0800 +Subject: [PATCH] add specific error information + +--- + hotpatch/hotupgrade.py | 9 ++++++--- + hotpatch/upgrade_en.py | 8 +++++--- + 2 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/hotpatch/hotupgrade.py b/hotpatch/hotupgrade.py +index c508e07..5dfee0d 100644 +--- a/hotpatch/hotupgrade.py ++++ b/hotpatch/hotupgrade.py +@@ -12,17 +12,19 @@ + # ******************************************************************************/ + from __future__ import print_function + ++from time import sleep ++ + import dnf.base + import dnf.exceptions + import hawkey +-from time import sleep + from dnf.cli import commands + from dnf.cli.option_parser import OptionParser + from dnfpluginscore import _, logger +-from .upgrade_en import UpgradeEnhanceCommand ++ + from .hot_updateinfo import HotUpdateinfoCommand +-from .updateinfo_parse import HotpatchUpdateInfo + from .syscare import Syscare ++from .updateinfo_parse import HotpatchUpdateInfo ++from .upgrade_en import UpgradeEnhanceCommand + from .version import Versions + + EMPTY_TAG = "-" +@@ -184,6 +186,7 @@ class HotupgradeCommand(dnf.cli.Command): + output, status = self.syscare.apply(hp_subname) + if status: + logger.info(_('Apply hot patch failed: %s.'), hp_subname) ++ logger.info(_('%s'), output) + else: + logger.info(_('Apply hot patch succeed: %s.'), hp_subname) + return status +diff --git a/hotpatch/upgrade_en.py b/hotpatch/upgrade_en.py +index 266bcae..3053179 100644 +--- a/hotpatch/upgrade_en.py ++++ b/hotpatch/upgrade_en.py +@@ -10,13 +10,14 @@ + # PURPOSE. + # See the Mulan PSL v2 for more details. + # ******************************************************************************/ +-import dnf + import gzip + import subprocess +-from dnfpluginscore import _ ++ ++import dnf + from dnf.cli import commands + from dnf.cli.commands.upgrade import UpgradeCommand + from dnf.cli.option_parser import OptionParser ++from dnfpluginscore import _, logger + + SUCCEED = 0 + FAIL = 255 +@@ -111,10 +112,11 @@ class UpgradeEnhanceCommand(dnf.cli.Command): + output, return_code = cmd_output(remove_cmd) + if return_code != SUCCEED: + print('Remove package failed: %s.' % pkg) ++ print(output) + exit(1) + else: + print('Remove package succeed: %s.' % pkg) +- # do not achieve the expected result of installing related kernel rpm ++ # do not achieve the expected result of installing related rpm + exit(1) + + def rebuild_rpm_db(self): +-- +2.27.0 + diff --git a/aops-ceres.spec b/aops-ceres.spec index 2264d9e56c8e18ec3d314c00cbd988cec95fa8a9..115c7fcfbcaa7e9ec387500b790a4f1c6a86f811 100644 --- a/aops-ceres.spec +++ b/aops-ceres.spec @@ -2,7 +2,7 @@ Name: aops-ceres Version: v1.3.4 -Release: 7 +Release: 8 Summary: An agent which needs to be adopted in client, it managers some plugins, such as gala-gopher(kpi collection), fluentd(log collection) and so on. License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} @@ -11,7 +11,8 @@ Patch0001: 0001-support-kabi-check.patch Patch0002: 0002-modify-re-of-kernel-filter.patch Patch0003: 0003-fix-bug-in-test_hotpatch.py.patch Patch0004: 0004-Modify-method-of-mark-invalid-data-and-add-summary.patch - +Patch0005: 0005-add-specific-error-information.patch + BuildRequires: python3-setuptools Requires: python3-requests python3-jsonschema python3-libconf Requires: python3-concurrent-log-handler dmidecode dnf-hotpatch-plugin >= v1.3.4 @@ -90,6 +91,9 @@ install -b -m755 ./extra-tools/da-tool/script/da-tool.sh ${RPM_BUILD_ROOT} %attr(755, root, root) %{_bindir}/da-tool-analysis %changelog +* Tue Nov 21 2023 wangguangge - v1.3.4-8 +- add specific error information + * Mon Nov 20 2023 liuchanggeng - v1.3.4-7 - new patch for da-tool - add summary report of schedswitch and delay