set agent migration task
This commit is contained in:
parent
2522871c10
commit
78ecd4e052
41
0013-set-agent-migration-task.patch
Normal file
41
0013-set-agent-migration-task.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From d5d7e0bed3bcfa893cf1907f2afbf8a3f05c679f Mon Sep 17 00:00:00 2001
|
||||
From: xuezhixin <xuezhixin@uniontech.com>
|
||||
Date: Mon, 13 Nov 2023 16:16:55 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?agent=E7=B3=BB=E7=BB=9F=E8=BF=81=E7=A7=BB?=
|
||||
=?UTF-8?q?=E4=BB=BB=E5=8A=A1?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
sysmig_agent/fork.py | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
|
||||
index cbc4165..23c10e2 100644
|
||||
--- a/sysmig_agent/fork.py
|
||||
+++ b/sysmig_agent/fork.py
|
||||
@@ -239,3 +239,20 @@ def get_info_version(data):
|
||||
version = json.loads(agent_info).get('kernel_version')
|
||||
return version
|
||||
|
||||
+
|
||||
+def system_migration(data):
|
||||
+ kernel_version = get_info_version(data)
|
||||
+ if not kernel_version:
|
||||
+ kernel_version = '0'
|
||||
+ task_id = json.loads(data).get('task_id')
|
||||
+ # 更新SQL任务状态
|
||||
+ sql_task_statue('1', task_id)
|
||||
+ # 发送消息给Server更新任务流状态
|
||||
+ post_server('task_start', task_id)
|
||||
+ # The migration status is modified, and the breakpoint continues
|
||||
+ mig_modify_statue(task_id)
|
||||
+ #sql_mig_statue('00')
|
||||
+ # MIGRATION MAIN
|
||||
+ timed_task_migrate(task_id, kernel_version)
|
||||
+ post_server('task_close', task_id)
|
||||
+
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.3
|
||||
Release: 12
|
||||
Release: 13
|
||||
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
|
||||
@ -19,6 +19,8 @@ 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
|
||||
Patch013: 0013-set-agent-migration-task.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
@ -117,6 +119,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-13
|
||||
- 0013-set-agent-migration-task.patch
|
||||
|
||||
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-12
|
||||
- 0012-get-agent-kernel-version.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user