From 771c0d4cb10a2e5a755a55cc9780841087c1e692 Mon Sep 17 00:00:00 2001 From: xuezhixin Date: Mon, 4 Nov 2024 17:48:17 +0800 Subject: [PATCH] get task process and migration stage information --- ...cess-and-migration-stage-information.patch | 35 +++++++++++++++++++ migration-tools.spec | 7 ++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 0020-get-task-process-and-migration-stage-information.patch diff --git a/0020-get-task-process-and-migration-stage-information.patch b/0020-get-task-process-and-migration-stage-information.patch new file mode 100644 index 0000000..4f433fa --- /dev/null +++ b/0020-get-task-process-and-migration-stage-information.patch @@ -0,0 +1,35 @@ +From 492a8e59c09991cb8bd1550cf62e849c15e1e517 Mon Sep 17 00:00:00 2001 +From: xuezhixin +Date: Fri, 10 Nov 2023 10:30:03 +0800 +Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BB=BB=E5=8A=A1=E8=BF=9B?= + =?UTF-8?q?=E5=BA=A6=E5=92=8C=E8=BF=81=E7=A7=BB=E9=98=B6=E6=AE=B5=E4=BF=A1?= + =?UTF-8?q?=E6=81=AF?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + sysmig_agent/share.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sysmig_agent/share.py b/sysmig_agent/share.py +index 27e8ff8..0c989a8 100644 +--- a/sysmig_agent/share.py ++++ b/sysmig_agent/share.py +@@ -30,6 +30,13 @@ def sql_abi_progress(data): + pass + + ++def sql_show_tables(): ++ sql = "SELECT task_progress,task_data FROM agent_task WHERE agent_ip = '{}';".format(get_local_ip()) ++ ret_sql_msg_info = DBHelper().execute(sql) ++ if ret_sql_msg_info: ++ print(str(ret_sql_msg_info.fetchall()) + '\n') ++ ++ + def abi_file_connect(sql_r): + abi_sql = "INSERT INTO agent_ABI_check_result VALUES('"+ get_local_ip()+"'," + sql_r + ',NOW());' + s = DBHelper() +-- +2.20.1 + diff --git a/migration-tools.spec b/migration-tools.spec index 84af514..858c7d9 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.2 -Release: 19 +Release: 20 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 @@ -26,7 +26,7 @@ Patch16: 0016-get-local-ip-on-the-agent.patch Patch17: 0017-add-process-data-in-database.patch Patch18: 0018-detection-of-imported-host-information-interface.patch Patch19: 0019-update-abi-result-to-database.patch - +Patch20: 0020-get-task-process-and-migration-stage-information.patch BuildArch: noarch BuildRequires: systemd @@ -125,6 +125,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Mon Nov 4 2024 xuezhixin - 1.0.2-20 +- 0020-get-task-process-and-migration-stage-information.patch + * Mon Nov 4 2024 xuezhixin - 1.0.2-19 - 0019-update-abi-result-to-database.patch -- Gitee