diff --git a/0012-get-agent-kernel-version.patch b/0012-get-agent-kernel-version.patch new file mode 100644 index 0000000000000000000000000000000000000000..c943c070b90f47ac3dafd487ded0d7c0d0779809 --- /dev/null +++ b/0012-get-agent-kernel-version.patch @@ -0,0 +1,40 @@ +From 939ef6edc6fb62922acafceb76139a0b0993fc3c Mon Sep 17 00:00:00 2001 +From: xuezhixin +Date: Mon, 13 Nov 2023 16:14:28 +0800 +Subject: [PATCH] =?UTF-8?q?agent=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0?= + =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=86=85=E6=A0=B8=E7=89=88=E6=9C=AC?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + sysmig_agent/fork.py | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py +index 3f81aea..cbc4165 100644 +--- a/sysmig_agent/fork.py ++++ b/sysmig_agent/fork.py +@@ -225,4 +225,17 @@ def mig_modify_statue(task_id): + ret = re.sub('[0-9]', '0', ret[0]) + ret[1] + sql_mig_statue(ret) + # loggea +- ''' +\ No newline at end of file ++ ''' ++ ++ ++ ++def get_info_version(data): ++ info = json.loads(data).get('info') ++ for i in range(len(info)): ++ agent_info = json.dumps(info[i]) ++ ip = json.loads(agent_info).get('agent_ip') ++ agent_ip = get_local_ip() ++ if ip == agent_ip: ++ version = json.loads(agent_info).get('kernel_version') ++ return version ++ +-- +2.20.1 + diff --git a/migration-tools.spec b/migration-tools.spec index 9721d682ecfbae25734f33bdebb797bb12ba46e1..212599dd85490afd22986fc544e90ffc491e752a 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.3 -Release: 11 +Release: 12 License: MulanPSL-2.0 Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system Source0: %{name}-%{version}.tar.gz @@ -18,7 +18,7 @@ Patch008: 0008-add-system-migration-task.patch Patch009: 0009-get-abi-detection-process.patch Patch010: 0010-update-abi-result-to-database.patch Patch011: 0011-initializate-the-migration-status.patch - +Patch012: 0012-get-agent-kernel-version.patch BuildArch: noarch BuildRequires: systemd @@ -117,6 +117,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Mon Nov 11 2024 xuezhixin - 1.0.3-12 +- 0012-get-agent-kernel-version.patch + * Mon Nov 11 2024 xuezhixin - 1.0.3-11 - 0011-initializate-the-migration-status.patch