!158 merge openEuler-24.03-LTS

From: @xuezhizone 
Reviewed-by: @xingwei-liu 
Signed-off-by: @xingwei-liu
This commit is contained in:
openeuler-ci-bot 2024-11-21 07:12:47 +00:00 committed by Gitee
commit 7cb970a1f0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
28 changed files with 1768 additions and 207 deletions

View File

@ -0,0 +1,37 @@
From d0e28ae440b4129eebff1b53d18f42d48ef0156c Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 14:59:04 +0800
Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=BD=AF=E4=BB=B6=E5=8C=85?=
=?UTF-8?q?=E5=92=8C=E4=B8=8B=E8=BD=BD=E7=9A=84=E8=BD=AF=E4=BB=B6=E5=8C=85?=
=?UTF-8?q?=E5=AF=B9=E5=BA=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/Abisystmcompchk.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
index 0b5c519..eab8322 100644
--- a/sysmig_agent/Abisystmcompchk.py
+++ b/sysmig_agent/Abisystmcompchk.py
@@ -818,3 +818,15 @@ def switch_write_migrate_report(report_name, num, flag):
with open(abi_incomp_chk, 'r') as fr_incomp:
column_incomp_list = fr_incomp.readlines()
write_row_by_row(report_name, column_incomp_list, 2, 0, num)
+
+
+def get_system_unique_pkg(current_pkg_list, download_pkg_list):
+ # clean history data
+ if os.path.exists(current_system_unique):
+ os.remove(current_system_unique)
+
+ fcw = open(current_system_unique, 'w')
+ for data in set(current_pkg_list).difference(set(download_pkg_list)):
+ fcw.write(data + '\n')
+ fcw.close()
+
--
2.20.1

View File

@ -1,72 +0,0 @@
From 854c1d018b9a5f1079f387101c62f86009c3baac Mon Sep 17 00:00:00 2001
From: Super User <root@localhost.localdomain>
Date: Mon, 21 Aug 2023 16:19:47 +0800
Subject: [PATCH] fix export error and no migration details issue
---
ut-Migration-tools/index.py | 4 ++--
ut-Migration-tools/templates/MT_migration.html | 3 ++-
ut-Migration-tools/views/migration.py | 6 +++++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ut-Migration-tools/index.py b/ut-Migration-tools/index.py
index 59e6830..635c5ac 100644
--- a/ut-Migration-tools/index.py
+++ b/ut-Migration-tools/index.py
@@ -218,7 +218,7 @@ def MT_export_migration_reports():
:return:
"""
mod = check_methods()
- f = open("/usr/lib/migration-tools-agent/.passwd.txt","r")
+ f = open("/usr/lib/migration-tools-server/.passwd.txt","r")
password = f.read()
f.close()
if mod:
@@ -234,7 +234,7 @@ def MT_export_migration_reports():
print("export report mkdir error:%s" % mkdir_log_pwd)
info = mod.split(',')
- scp_log = "sshpass -p %s" % password + " scp -r %s" % json_data.get('info').split("|")[0] + "@%s" % info[1] \
+ scp_log = "sshpass -p '%s'" % password + " scp -r %s" % json_data.get('info').split("|")[0] + "@%s" % info[1] \
+ ":/var/tmp/uos-migration/UOS*.tar.gz /var/uos-migration/"
try:
os.system(scp_log)
diff --git a/ut-Migration-tools/templates/MT_migration.html b/ut-Migration-tools/templates/MT_migration.html
index 39bed0b..77bf56a 100644
--- a/ut-Migration-tools/templates/MT_migration.html
+++ b/ut-Migration-tools/templates/MT_migration.html
@@ -65,7 +65,8 @@
<script>
$(document).ready(function() {
- progress = setInterval("check_progress()",2000);
+ progress = setInterval("check_progress()",2000);
+ log_info = setInterval("migration_details()",2000);
setInterval("system_migration()",36000);
});
diff --git a/ut-Migration-tools/views/migration.py b/ut-Migration-tools/views/migration.py
index 33c4b19..2e9c0c5 100644
--- a/ut-Migration-tools/views/migration.py
+++ b/ut-Migration-tools/views/migration.py
@@ -38,6 +38,10 @@ def close_tool(data):
def check_user(data):
services = check_services(data, '/check_user')
if services:
+ json_data = json.loads(data)
+ with open('/usr/lib/migration-tools-server/.passwd.txt','w',encoding='utf-8') as f:
+ text = json_data['passwd']
+ f.write(text)
return services
def check_repo(data):
@@ -85,4 +89,4 @@ def system_migration(data):
def migration_details(data):
services = check_services(data, '/migration_details')
if services:
- return services
\ No newline at end of file
+ return services
--
2.41.0

View File

@ -1,32 +0,0 @@
From b7df99566ea6988c5411468b2b9d7e02f25bc85a Mon Sep 17 00:00:00 2001
From: Super User <root@localhost.localdomain>
Date: Wed, 6 Sep 2023 17:14:29 +0800
Subject: [PATCH] allow uefi boot
---
.../centos7/openeuler/centos72openeuler.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py b/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py
index 1cedebf..f24d765 100644
--- a/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py
+++ b/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py
@@ -195,7 +195,6 @@ def main():
if system_sync():
subprocess.run('dnf -y groupinstall Minimal Install', shell=True)
- conf_grub()
else:
print("Removing confilct package yum...")
os.system("rpm -e --nodeps yum")
@@ -216,6 +215,7 @@ def main():
if os.path.exists(yum_conflict_dir):
shutil.rmtree(yum_conflict_dir)
print("Installing yum...")
+ conf_grub()
run_subprocess('dnf install -y yum'.split())
print("System migration completed, rebooting system")
--
2.41.0

View File

@ -0,0 +1,93 @@
From acb29d91b7b13f56085bc9e9b511aef367de9a0b Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 15:04:12 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E5=89=8D=E8=BD=AF=E4=BB=B6?=
=?UTF-8?q?=E5=8C=85=E5=92=8C=E7=B3=BB=E7=BB=9F=E4=BF=A1=E6=81=AF=E5=87=86?=
=?UTF-8?q?=E5=A4=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/Abisystmcompchk.py | 68 +++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
index eab8322..d717cdf 100644
--- a/sysmig_agent/Abisystmcompchk.py
+++ b/sysmig_agent/Abisystmcompchk.py
@@ -830,3 +830,71 @@ def get_system_unique_pkg(current_pkg_list, download_pkg_list):
fcw.write(data + '\n')
fcw.close()
+
+#Check the environment before migration and generate a detection report
+def migrate_before_abi_chk(q_query, task_status):
+ i=0
+ Flag='0'
+ Oth='2'
+ global percentage
+ global total_rpm_nums
+ task_status_error = '2'
+ migration_download_list = []
+
+ log = logger_init()
+ log.info('============== START TIME '+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')+' ==============')
+
+ download_path = local_dir + 'uos/rpms'
+ current_packages_string = get_system_pkg_name(Flag, log)
+ if not current_packages_string:
+ msg_tup = ('0', task_status_error)
+ q_query.put(msg_tup)
+ log.info('The current progress exit:' + str(msg_tup))
+ #return False
+
+ os.system('yumdownloader --destdir=%s%s --skip-broken' %(download_path, current_packages_string))
+
+ download_list = get_system_pkg_list(migration_download_list)
+ if not download_list:
+ log.info('yumdownloader rpm pakcages failed ...')
+ msg_tup = ('0', task_status_error)
+ q_query.put(msg_tup)
+ log.info('The current progress exit:' + str(msg_tup))
+ #return False
+ total_rpm_nums = len(download_list)
+
+ current_list = get_system_pkg_name(Oth, log)
+ if not current_list:
+ msg_tup = ('0', task_status)
+ q_query.put(msg_tup)
+ log.info('The current progress exit:' + str(msg_tup_error))
+ #return False
+
+ get_system_unique_pkg(list(current_list), migration_download_list)
+
+ cur_dir = os.getcwd()
+ os.chdir(download_path)
+ rst = MutilThread(download_list, q_query, log)
+ os.chdir(cur_dir)
+
+ agent_ABI_check_result()
+
+ migrate_before_report_name = create_migrate_report_name(Flag, log)
+ if not migrate_before_report_name:
+ msg_tup = ('0', task_status)
+ q_query.put(msg_tup)
+ log.info('The current progress exit:' + str(msg_tup))
+ #return False
+
+ while i < 4:
+ write_migrate_report_rst =switch_write_migrate_report(migrate_before_report_name, i, Flag)
+ i = i + 1
+
+ task_status = '0'
+ msg_tup = (percentage, task_status)
+ q_query.put(msg_tup)
+ log.info('The current progress has been completed:' + str(msg_tup))
+ log.info('============== END TIME '+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')+' ==============')
+
+ return '0'
+
--
2.20.1

View File

@ -0,0 +1,102 @@
From 75714106374a4e62630c0e6b131f74a0717518bc Mon Sep 17 00:00:00 2001
From: lixin <lixinb@uniontech.com>
Date: Mon, 13 Nov 2023 15:17:47 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=A3=80=E6=B5=8B=E6=8A=A5?=
=?UTF-8?q?=E5=91=8A=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
views/reports.py | 25 +++++++++++++++++++++++++
views/server.py | 33 ++++++++++++++++++++++++++++++++-
2 files changed, 57 insertions(+), 1 deletion(-)
create mode 100644 views/reports.py
diff --git a/views/reports.py b/views/reports.py
new file mode 100644
index 0000000..6295283
--- /dev/null
+++ b/views/reports.py
@@ -0,0 +1,25 @@
+import os
+from logger import *
+from connect_sql import DBHelper
+
+
+os.chdir('/usr/lib/uos-sysmig-server')
+migration_log = Logger('/var/tmp/uos-migration/migration.log', logging.DEBUG, logging.DEBUG)
+
+
+def migration_detection(data):
+ """
+ 迁移检测报告
+ :return:
+ """
+ agent_ip = data.get('agent_ip')
+ info_sql = "select AES_DECRYPT(agent_passwd, 'coco'),agent_username from agent_info where agent_ip='%s'" % agent_ip
+ info = DBHelper().execute(info_sql).fetchall()
+ scp_log = "sshpass -p %s scp -r %s@%s:/var/tmp/uos-migration/UOS_analysis_report*.tar.gz /var/uos-migration/" % \
+ (str(info[0][0], encoding="utf-8"), info[0][1], agent_ip)
+ try:
+ os.system(scp_log)
+ migration_log.info(scp_log)
+ except:
+ migration_log.error('export report scp error:%s' % scp_log)
+ return 'success'
\ No newline at end of file
diff --git a/views/server.py b/views/server.py
index 369a750..4cfab8f 100644
--- a/views/server.py
+++ b/views/server.py
@@ -1,8 +1,13 @@
import json
+import os
from datetime import datetime
from connect_sql import DBHelper
from sysmig_agent.share import getSysMigConf
+from views import reports
+from logger import *
+
+migration_log = Logger('/var/tmp/uos-migration/migration.log', logging.DEBUG, logging.DEBUG)
def import_host_info(data):
"""
@@ -343,4 +348,30 @@ def get_storage_num(data):
faild = len(get_faild_num)
data = {'success': success, 'faild': faild}
json_data = json.dumps(data)
- return json_data
\ No newline at end of file
+ return json_data
+
+
+reports_type = {
+ "migration_detection": reports.migration_detection,
+}
+
+def export_reports(data):
+ """
+ 导出各种报告
+ :param data:
+ :return:
+ """
+ data = json.loads(data)
+ report_type = reports_type.get(data.get('reports_type'))
+ if report_type:
+ mkdir_log_pwd = "/var/uos-migration/"
+ isExists = os.path.exists(mkdir_log_pwd)
+ if not isExists:
+ try:
+ os.makedirs(mkdir_log_pwd)
+ migration_log.info(mkdir_log_pwd)
+ except:
+ migration_log.war("export report mkdir war:%s" % mkdir_log_pwd)
+
+ report_type(data)
+ return 'success'
\ No newline at end of file
--
2.20.1

View File

@ -1,72 +0,0 @@
From 76920b1ab0b7204c2feaf7dc2fa04b6d72730b5a Mon Sep 17 00:00:00 2001
From: lixin <lixinb@uniontech.com>
Date: Wed, 6 Sep 2023 17:23:29 +0800
Subject: [PATCH] modify grub rules to match NIC name
---
.../centos7/openeuler/centos72openeuler.py | 41 ++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py b/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py
index f24d765..2be7b6b 100644
--- a/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py
+++ b/ut-Migration-tools/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py
@@ -83,6 +83,43 @@ def add_boot_option():
except Exception as e:
print(e)
+
+def set_grub_biosdev_rules():
+ """
+ Set grub bisodev rule which can be don`t modify network configuration names.
+ When the leapp has been made initrd, the function will set net.ifnames in /etc/default/grub.
+ Returns:
+ """
+ default_grub_path = "/etc/default/grub"
+ set_content = "net.ifnames=0 biosdevname=0"
+ if not os.path.exists(default_grub_path):
+ return
+ with open(default_grub_path, 'r') as gf:
+ gret = gf.readlines()
+ gf.close()
+ grub_content = ''
+ for i in range(len(gret)):
+ if "GRUB_CMDLINE_LINUX" in gret[i]:
+ cmdline_tmp = gret[i].split('"', -1)[1]
+ grub_content += 'GRUB_CMDLINE_LINUX="' + cmdline_tmp + ' ' + set_content + '"\n'
+ continue
+ grub_content += gret[i]
+ try:
+ if not os.path.exists(default_grub_path + '.disable'):
+ shutil.copyfile(default_grub_path, default_grub_path + '.disable')
+ os.remove(default_grub_path)
+ else:
+ print("grub file has been modified")
+ return
+ except Exception as e:
+ print(e)
+ return
+ with open(default_grub_path, 'w+') as wgf:
+ wgf.write(grub_content)
+ wgf.close()
+ return True
+
+
def swap_release(release):
tmp_dir = '/var/tmp'
rpme_release = 'rpm -qf /etc/os-release | xargs -i rpm -e --nodeps {}'
@@ -214,8 +251,10 @@ def main():
yum_conflict_dir = '/etc/yum/'
if os.path.exists(yum_conflict_dir):
shutil.rmtree(yum_conflict_dir)
- print("Installing yum...")
+ print("Configuring grub...")
+ set_grub_biosdev_rules()
conf_grub()
+ print("Installing yum...")
run_subprocess('dnf install -y yum'.split())
print("System migration completed, rebooting system")
--
2.41.0

View File

@ -0,0 +1,45 @@
From 5787327a9f14de7b3f40945d328a2753b08a0f04 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 15:19:25 +0800
Subject: [PATCH] =?UTF-8?q?ABI=E6=A3=80=E6=B5=8B=E5=90=8E=E5=AE=8C?=
=?UTF-8?q?=E6=88=90=E6=95=B4=E5=90=88=E6=8A=A5=E5=91=8A=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/Abisystmcompchk.py | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
index d717cdf..493c09b 100644
--- a/sysmig_agent/Abisystmcompchk.py
+++ b/sysmig_agent/Abisystmcompchk.py
@@ -898,3 +898,24 @@ def migrate_before_abi_chk(q_query, task_status):
return '0'
+
+#Check the environment after the migration and generate a detection report
+def migrate_behind_abi_chk():
+ i=0
+ Flag='1'
+
+ log = logger_init()
+
+ current_install_uos_list = get_system_pkg_name(Flag, log)
+ if not current_install_uos_list:
+ return False
+
+ migrate_behind_report_name = create_migrate_report_name(Flag, log)
+ if not migrate_behind_report_name:
+ return False
+
+ while i < 4:
+ write_migrate_report_rst =switch_write_migrate_report(migrate_behind_report_name, i, Flag)
+ i = i + 1
+
+ return '0'
--
2.20.1

View File

@ -0,0 +1,70 @@
From ef8d18b5e61506b7450f1fb96ca895e704f9de7a Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 15:23:16 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E5=AE=8C=E6=88=90AB?=
=?UTF-8?q?I=E6=A3=80=E6=9F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/Abisystmcompchk.py | 46 +++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
index 493c09b..79e6581 100644
--- a/sysmig_agent/Abisystmcompchk.py
+++ b/sysmig_agent/Abisystmcompchk.py
@@ -919,3 +919,49 @@ def migrate_behind_abi_chk():
i = i + 1
return '0'
+
+
+def MutilThread(nameList, Query, muth_logger):
+ global exitFlag
+
+ # Default number of cpus
+ thread_num = int(cpu_count() * 1.5)
+
+ threadList = ["Thread-%d" % (num) for num in range(0, thread_num)]
+
+ threads = []
+ threadID = 10
+ # threadID = 1
+
+ fw = open(abi_incomp_chk, 'w')
+ fr = open(abi_comp_chk, 'w')
+
+ # Creating new thread
+ for tName in threadList:
+ thread = myThread(threadID, tName, workQueue, queueLock, fw, fr, Query, muth_logger)
+ thread.start()
+ threads.append(thread)
+ threadID += 1
+
+ # Fill in the queue
+ queueLock.acquire()
+ for word in nameList:
+ workQueue.put(word)
+ queueLock.release()
+
+ # Waiting queue clear
+ while not workQueue.empty():
+ pass
+
+ # Notifies the thread that it is time to exit
+ exitFlag = 1
+
+ # Wait for all threads to complete
+ for t in threads:
+ t.join()
+ muth_logger.info('========== Exit main thread...... ==========')
+
+ fw.close()
+ fr.close()
+
+ return True
--
2.20.1

View File

@ -0,0 +1,64 @@
From 8d24d1c2a6462c4516127024c933ec9e793c518d Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 15:48:30 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF=E9=98=9F?=
=?UTF-8?q?=E5=88=97=E6=9B=B4=E6=96=B0abi=E6=A3=80=E6=B5=8B=E8=BF=9B?=
=?UTF-8?q?=E5=BA=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/fork.py | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 sysmig_agent/fork.py
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
new file mode 100644
index 0000000..a128722
--- /dev/null
+++ b/sysmig_agent/fork.py
@@ -0,0 +1,40 @@
+# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+# SPDX-License-Identifier: MulanPubL-2.0-or-later
+
+import platform
+import threading
+from multiprocessing import Process, Queue
+from apscheduler.schedulers.background import BackgroundScheduler
+import time
+import os
+import sys
+from sysmig_agent.abi_weight import *
+from sysmig_agent.Abisystmcompchk import migrate_before_abi_chk, migrate_behind_abi_chk
+import socket
+#from share import *
+from sysmig_agent.short_task import *
+
+from sysmig_agent.migration import *
+#sys.path.append("..")
+#from connect_sql import DBHelper
+from sysmig_agent.agent_request import post_server
+
+# create message query
+q = Queue(maxsize=0)
+
+
+# 定时任务
+def up_to_date_sql_abi():
+ # 获得sql的任务ID
+ # ret_task = get_sql_message()
+ # print('Get message query : ' + str(ret_task[0]))
+ # 获得ABI消息队列信息tuple
+ ret_abi_info = get_abi_info()
+ if ret_abi_info:
+ abi_process = ret_abi_info[0]
+ abi_task = ret_abi_info[1]
+ else:
+ return 1
+ # 获取abi progress 更新数据库内
+ sql_abi_progress(abi_process)
+ return 0
--
2.20.1

View File

@ -0,0 +1,47 @@
From c10a2b4ab02efa9f3172aae2741f084a1c477adc Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 15:56:28 +0800
Subject: [PATCH] =?UTF-8?q?agent=E8=BF=81=E7=A7=BB=E6=A3=80=E6=B5=8B?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=89=A7=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/fork.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
index a128722..daea65f 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -38,3 +38,26 @@ def up_to_date_sql_abi():
# 获取abi progress 更新数据库内
sql_abi_progress(abi_process)
return 0
+
+
+# ABI系统检测
+def timed_task_abi(task_id):
+ time_task = BackgroundScheduler(timezone='Asia/Shanghai')
+ task_id=str(task_id)
+ p = time_task.add_job(up_to_date_sql_abi, 'interval', seconds=3)
+ time_task.start()
+ try:
+ task_statue='1'
+ p_abi = Process(target=migrate_before_abi_chk, args=(q,task_statue,))
+ p_abi.start()
+ p_abi.join()
+ # Determine whether the message queue is dead or empty to end the timer
+ while not q.empty():
+ continue
+ time_task.shutdown()
+ except (KeyboardInterrupt, SystemExit):
+ # Not strictly necessary if daemonic mode is enabled but should be done if possible
+ time_task.shutdown()
+ print('Exit The Job!')
+
+
--
2.20.1

View File

@ -0,0 +1,97 @@
From 5429befc45c4aff1517ee2346c16da3c2aafd8a4 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:00:22 +0800
Subject: [PATCH] =?UTF-8?q?agent=E7=9A=84=E7=B3=BB=E7=BB=9F=E8=BF=81?=
=?UTF-8?q?=E7=A7=BB=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 | 73 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
index daea65f..615b3d5 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -61,3 +61,76 @@ def timed_task_abi(task_id):
print('Exit The Job!')
+# 系统迁移 定时任务更新进度
+def timed_task_migrate(task_id, kernel_version):
+ time_task_m = BackgroundScheduler(timezone='Asia/Shanghai')
+ p = time_task_m.add_job(up_to_date_sql_migrate, 'interval', seconds=3)
+ migInit_porgress()
+ time_task_m.start()
+ try:
+ while 8 > int(str(get_mig_state(task_id))[1]):
+ state = str(get_mig_state(task_id))[1]
+ if str(get_mig_state(task_id))[0] == '1':
+ ##
+ ## error , too many request systen migration
+ time_task_m.shutdown()
+ return 'error'
+ old_os_name = get_old_osname()
+ if '0' == state:
+ sql_mig_statue('10')
+ if ifnot_mig_kernel(kernel_version):
+ sql_mig_statue('18')
+ t = Process(target=centos8_main, args=(old_os_name, task_id,))
+ t.start()
+ t.join()
+ elif '2' == state:
+ sql_mig_statue('12')
+ ## skip broken
+ skip = 0
+ t = Process(target=mig_distro_sync, args=(skip, task_id,))
+ t.start()
+ t.join()
+ elif '3' == state:
+ # Breakpoint
+ sql_mig_statue('05')
+ elif '4' == state:
+ sql_mig_statue('14')
+ mig_kernel(kernel_version)
+ main_conf(old_os_name)
+ # Migration report
+ try:
+ migrate_behind_abi_chk()
+ except:
+ # Generate analysis report error
+ pass
+ sql_mig_statue('05')
+ elif '5' == state:
+ sql_mig_statue('15')
+ # Migration state weight : 90
+ res = mig_whether_success()
+
+ # new system regen sql
+ get_new_osversion()
+ # tar.gz type
+ targz_mig_dir_log()
+ targz_mig_dir_report()
+ sql_abi_progress(100)
+ if 80 > int(res):
+ sql_task_statue('3', task_id)
+ sql_mig_statue('08')
+ return 1
+ # data = ' 迁移失败。'
+ else:
+ sql_task_statue('2', task_id)
+ sql_mig_statue('09')
+ time_task_m.shutdown()
+ return 0
+ # data = '迁移成功。'
+ time.sleep(3) # 其他任务是独立的线程执行
+ time_task_m.shutdown()
+ return 0
+ except (KeyboardInterrupt, SystemExit):
+ # Not strictly necessary if daemonic mode is enabled but should be done if possible
+ time_task_m.shutdown()
+ sql_task_statue('3', task_id)
+
--
2.20.1

View File

@ -0,0 +1,40 @@
From 620114229af58823e27a370ad2839365b0f4535e Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:05:28 +0800
Subject: [PATCH] =?UTF-8?q?agent=E8=8E=B7=E5=8F=96abi=E7=9A=84=E6=B6=88?=
=?UTF-8?q?=E6=81=AF=E9=98=9F=E5=88=97=E8=BF=9B=E5=BA=A6=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/fork.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
index 615b3d5..8c2f4b6 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -134,3 +134,19 @@ def timed_task_migrate(task_id, kernel_version):
time_task_m.shutdown()
sql_task_statue('3', task_id)
+
+def get_abi_info():
+ if q.empty():
+ return None
+# print("Full :", q.full())
+# print("Empty :", q.empty())
+# print("QSize:", q.qsize())
+ size = int(q.qsize())
+ i=0
+ msg = ''
+ while i < size:
+ i += 1
+ msg = q.get()
+ return msg
+# if not q.empty():
+
--
2.20.1

View File

@ -0,0 +1,72 @@
From 1b94627aaa5a88b12e8d9d9ebf42be2dc08d7503 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:08:31 +0800
Subject: [PATCH] =?UTF-8?q?agent=E7=9A=84abi=E6=A3=80=E6=B5=8B=E7=BB=93?=
=?UTF-8?q?=E6=9E=9C=E6=9B=B4=E6=96=B0=E5=88=B0sql?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/fork.py | 48 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
index 8c2f4b6..3447678 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -150,3 +150,51 @@ def get_abi_info():
return msg
# if not q.empty():
+
+def process_time_task_abi(task_id):
+ # 定时任务启动并更新进度
+ timed_task_abi(task_id)
+ # abi结果接入数据库内
+ abi_file_sql(abi_file)
+ # p_timed_task = Process(target=timed_task_abi, args=(task_id,))
+ # p_timed_task.start()
+ # p_timed_task.join()
+
+
+def structure_task():
+ # 先获得mysql的任务
+ ret_task = get_sql_task()
+ if not ret_task:
+ print('agent_task is None..')
+ pass
+ # 判断任务类型
+ print(ret_task)
+ if 1 == ret_task:
+ # 调用ABI权重比函数
+ ret_data = abi_check_priority()
+ # 更新mysql的任务状态
+ put_sql_task(ret_data)
+
+
+
+# ABI对比结果文件存放数据库内
+def abi_file_sql(path):
+ with open(path, 'r') as p:
+ ret = p.readlines()
+ p.close()
+ for i in range(len(ret)):
+ info = ret[i].split(',', 5)
+ info_str = ''
+ for n in range(len(info)):
+ if n < 9:
+ sinfo = ''
+ if info[n].strip().strip('\n'):
+ sinfo = info[n].strip().strip('\n')
+ info_str = info_str+"'{}'".format(sinfo)
+ else:
+ sinfo='NULL'
+ info_str = info_str+"{}".format(sinfo)
+ if n != (len(info)-1):
+ info_str = info_str+','
+ abi_file_connect(info_str)
+
--
2.20.1

View File

@ -0,0 +1,53 @@
From 127580df37b9b0264af9b54e4618a9b0e1939dda Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:11:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=BF=81=E7=A7=BB?=
=?UTF-8?q?=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/fork.py | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
index 3447678..3f81aea 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -198,3 +198,31 @@ def abi_file_sql(path):
info_str = info_str+','
abi_file_connect(info_str)
+
+def check_environment(data):
+ task_id = json.loads(data).get('task_id')
+ # 更新SQL任务状态
+ sql_task_statue('1', task_id)
+ # 发送消息给Server更新任务流状态
+ post_server('task_start', task_id)
+ process_time_task_abi(task_id)
+ # tar.gz types abi report
+ targz_mig_dir_abi()
+ sql_task_statue('2', task_id)
+ post_server('task_close', task_id)
+
+
+# 初始化进度阶段
+def mig_modify_statue(task_id):
+ if not get_mig_state(task_id):
+ sql_mig_statue('00')
+ '''
+ else:
+ # Too many migration requests
+ # If you need to continue the migration, please change the task_data of the Mysql
+ return 1
+ ret = get_mig_state(task_id)
+ ret = re.sub('[0-9]', '0', ret[0]) + ret[1]
+ sql_mig_statue(ret)
+ # loggea
+ '''
\ No newline at end of file
--
2.20.1

View File

@ -0,0 +1,40 @@
From 939ef6edc6fb62922acafceb76139a0b0993fc3c Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
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

View 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

View File

@ -0,0 +1,34 @@
From 3b4ff69c1c59e004fe8c8b60220cf98e0461d847 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:24:00 +0800
Subject: [PATCH] =?UTF-8?q?IP=E6=98=AF=E5=90=A6=E5=92=8C=E8=AF=B7=E6=B1=82?=
=?UTF-8?q?=E7=9A=84agent=E7=9A=84IP=E5=8C=B9=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/fork.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
index 23c10e2..8ad6d59 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -256,3 +256,13 @@ def system_migration(data):
timed_task_migrate(task_id, kernel_version)
post_server('task_close', task_id)
+
+def if_env_check(data):
+ agent_ips = list(json.loads(data).get('agent_ip'))
+ for n in range(len(agent_ips)):
+ ip = str(agent_ips[n])
+ if ip == get_local_ip():
+ return True
+ return False
+
+
--
2.20.1

View File

@ -0,0 +1,41 @@
From f9a676fb7297beb5e40af2fc39e1c872c33ffded Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:30:34 +0800
Subject: [PATCH] =?UTF-8?q?agent=E6=94=B6=E5=88=B0=E8=AF=B7=E6=B1=82?=
=?UTF-8?q?=E5=90=8E=E5=88=86=E5=8F=91=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 8ad6d59..679fb21 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -266,3 +266,20 @@ def if_env_check(data):
return False
+def post_task(data):
+ task_mod = json.loads(data).get('mod')
+ if 'check_info' == task_mod:
+ t = threading.Thread(target=check_info, args=[data])
+ elif 'check_repo' == task_mod:
+ t = threading.Thread(target=check_repo, args=[data])
+ elif 'check_kernel' == task_mod:
+ t = threading.Thread(target=check_kernel, args=[data])
+ elif 'check_environment' == task_mod:
+ if if_env_check(data):
+ t = threading.Thread(target=check_environment, args=[data])
+ elif 'system_migration' == task_mod:
+ t = threading.Thread(target=system_migration, args=[data])
+ t.start()
+ return 'y'
+
+
--
2.20.1

View File

@ -0,0 +1,70 @@
From fa9113d9f5c7ba0d80835d9e5dfb683aca9834a7 Mon Sep 17 00:00:00 2001
From: lixin <lixinb@uniontech.com>
Date: Mon, 13 Nov 2023 16:33:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=81=E7=A7=BB=E6=97=A5?=
=?UTF-8?q?=E5=BF=97=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.py | 1 +
views/reports.py | 18 ++++++++++++++++++
views/server.py | 1 +
3 files changed, 20 insertions(+)
diff --git a/index.py b/index.py
index 505e91f..a392531 100644
--- a/index.py
+++ b/index.py
@@ -36,6 +36,7 @@ mods = {
'get_environment_data': server.get_environment_data,
'get_repo_arch_info': server.get_repo_arch_info,
'get_storage_num': server.get_storage_num,
+ 'export_reports': server.export_reports,
}
diff --git a/views/reports.py b/views/reports.py
index 6295283..c616dfd 100644
--- a/views/reports.py
+++ b/views/reports.py
@@ -22,4 +22,22 @@ def migration_detection(data):
migration_log.info(scp_log)
except:
migration_log.error('export report scp error:%s' % scp_log)
+ return 'success'
+
+
+def migration_logs(data):
+ """
+ 迁移日志
+ :return:
+ """
+ agent_ip = data.get('agent_ip')
+ info_sql = "select AES_DECRYPT(agent_passwd, 'coco'),agent_username from agent_info where agent_ip='%s'" % agent_ip
+ info = DBHelper().execute(info_sql).fetchall()
+ scp_log = "sshpass -p %s scp -r %s@%s:/var/tmp/uos-migration/UOS_migration_log*.tar.gz /var/uos-migration/" % \
+ (str(info[0][0], encoding="utf-8"), info[0][1], agent_ip)
+ try:
+ os.system(scp_log)
+ migration_log.info(scp_log)
+ except:
+ migration_log.error('export report scp error:%s' % scp_log)
return 'success'
\ No newline at end of file
diff --git a/views/server.py b/views/server.py
index 4cfab8f..7c17a2f 100644
--- a/views/server.py
+++ b/views/server.py
@@ -353,6 +353,7 @@ def get_storage_num(data):
reports_type = {
"migration_detection": reports.migration_detection,
+ "migration_logs": reports.migration_logs,
}
def export_reports(data):
--
2.20.1

View File

@ -0,0 +1,272 @@
From 0e6f8d8f1bb7dba15a206b7a02c9dc70ad9b1aba Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:39:51 +0800
Subject: [PATCH] =?UTF-8?q?agent=E6=A3=80=E6=B5=8Brepo=E4=BB=BB=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/check.py | 93 ------------------------
sysmig_agent/short_task.py | 144 +++++++++++++++++++++++++++++++++++++
2 files changed, 144 insertions(+), 93 deletions(-)
diff --git a/sysmig_agent/check.py b/sysmig_agent/check.py
index 141a734..1a21c52 100644
--- a/sysmig_agent/check.py
+++ b/sysmig_agent/check.py
@@ -178,99 +178,6 @@ def check_user(data):
return re_data
-def init_remove_oldrepo():
- backup_comment = '#This is a yum repository file that was disabled . <Migration to UiniontechOS> \
- \n'
- path = '/etc/yum.repos.d/'
- repos = os.listdir(path)
- for repo in repos:
- path_file = path+'/'+repo
- if not os.path.isfile(path_file):
- continue
- if not re.search('repo$',repo):
- continue
- with open(path_file, 'r') as fsrc:
- content = fsrc.read()
- with open(path_file+'.disabled','w') as fdst:
- fdst.write(repo+'\n'+backup_comment+content)
- fdst.close()
- fsrc.close()
- os.remove(path_file)
-
-
-#初始化repo文件
-def initRepoFile(baseurl):
- os_version_ret = platform.dist()
- version = os_version_ret[1].split('.',-1)
- reposdir = '/etc/yum.repos.d/'
- h = 0
- if re.match('file:',baseurl):
- str0, path = baseurl.split('://',1)
- path = '/' + path.strip('/') + '/'
- else:
- h = 1
- if re.fullmatch('8',version[0]):
- path_appstream = baseurl+'/AppStream'
- path_baseos = baseurl+'/BaseOS'
- path_310 = baseurl+'/kernel-3.10'
- path_419 = baseurl+'/kernel419'
- path_510 = baseurl+'/kernel510'
-
- repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = '''+path_appstream.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-BaseOS]\nname = UniontechOS BaseOS\nbaseurl = '''+path_baseos.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-4.19.0]\nname = UniontechOS Kernel-4.19.0\nbaseurl = '''+path_419.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n[UniontechOS-kernel-5.10.0]\nname = UniontechOS Kernel-5.10.0\nbaseurl = '''+path_510.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n
-'''
- else:
- path_310 = baseurl+'/kernel-3.10'
- repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = '''+baseurl.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-3.10.0]\nname = UniontechOS Kernel-3.10.0\nbaseurl = '''+path_310.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n
- '''
- repofile = os.path.join(reposdir, 'switch-to-uos.repo')
- with open(repofile,'w') as f_repo:
- f_repo.write(repostr_uos)
- f_repo.close()
-
-
-#检测repo文件创建缓存
-def checkRepoMakeCache():
- os.system('yum clean all')
- os.system('yum makecache')
- os_version_ret = platform.dist()
- os_arch = platform.machine()
- version = os_version_ret[1].split('.',-1)
- ret = os.path.exists('/var/cache/dnf/UniontechOS-AppStream.solv')
- if ret:
- ret = os.path.exists('/var/cache/dnf/UniontechOS-BaseOS.solv')
- if ret or re.fullmatch('7',version[0]):
- return 0
- else:
- return 1
- else:
- if re.fullmatch('7',version[0]):
- ret = os.path.exists('/var/cache/yum/%s/7/UniontechOS-AppStream/repomd.xml' % os_arch)
- if ret:
- return 0
- return 1
-
-
-#检测repo
-def check_repo(data_j):
- uos_sysmig_conf = json.loads(getSysMigConf())
- AGENT_IP = json.loads(uos_sysmig_conf).get('agentip').strip()[1:-1]
- baseurl = json.loads(data_j).get('repo_pwd')
- keylist = None
- valuelist = None
- data = None
- init_remove_oldrepo()
- initRepoFile(baseurl)
- state = checkRepoMakeCache()
-
- if state == 0:
- keylist = ['ip','res','data']
- valuelist = [AGENT_IP,state,'连接成功']
- else:
- data = '下载失败,请检查您的软件源'
- keylist = ['ip','res','error']
- valuelist = [AGENT_IP,state,data]
- return list_to_json(keylist,valuelist)
-
def check_os_kernel(data):
uos_sysmig_conf = json.loads(getSysMigConf())
diff --git a/sysmig_agent/short_task.py b/sysmig_agent/short_task.py
index 11dd9ef..4e4dae3 100644
--- a/sysmig_agent/short_task.py
+++ b/sysmig_agent/short_task.py
@@ -138,3 +138,147 @@ def get_agent_os():
AGENT_OS = os_version_ret[0] + version[0]
return AGENT_OS
+
+
+def init_remove_oldrepo():
+ backup_comment = '#This is a yum repository file that was disabled . <Migration to UiniontechOS> \
+ \n'
+ path = '/etc/yum.repos.d/'
+ repos = os.listdir(path)
+ for repo in repos:
+ path_file = path+'/'+repo
+ if not os.path.isfile(path_file):
+ continue
+ if not re.search('repo$',repo):
+ continue
+ with open(path_file, 'r') as fsrc:
+ content = fsrc.read()
+ with open(path_file+'.disabled','w') as fdst:
+ fdst.write(repo+'\n'+backup_comment+content)
+ fdst.close()
+ fsrc.close()
+ os.remove(path_file)
+
+
+#初始化repo文件
+def initRepoFile(baseurl):
+ os_version_ret = platform.dist()
+ version = os_version_ret[1].split('.',-1)
+ reposdir = '/etc/yum.repos.d/'
+ h = 0
+ if re.match('file:',baseurl):
+ str0, path = baseurl.split('://',1)
+ path = '/' + path.strip('/') + '/'
+ else:
+ h = 1
+ if re.fullmatch('8',version[0]):
+ path_appstream = baseurl+'/AppStream'
+ path_baseos = baseurl+'/BaseOS'
+ path_310 = baseurl+'/kernel-3.10'
+ path_419 = baseurl+'/kernel419'
+ path_510 = baseurl+'/kernel510'
+
+ repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = '''+path_appstream.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-BaseOS]\nname = UniontechOS BaseOS\nbaseurl = '''+path_baseos.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-4.19.0]\nname = UniontechOS Kernel-4.19.0\nbaseurl = '''+path_419.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n[UniontechOS-kernel-5.10.0]\nname = UniontechOS Kernel-5.10.0\nbaseurl = '''+path_510.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n
+'''
+ else:
+ path_310 = baseurl+'/kernel-3.10'
+ repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = '''+baseurl.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-3.10.0]\nname = UniontechOS Kernel-3.10.0\nbaseurl = '''+path_310.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n
+ '''
+ repofile = os.path.join(reposdir, 'switch-to-uos.repo')
+ with open(repofile,'w') as f_repo:
+ f_repo.write(repostr_uos)
+ f_repo.close()
+
+
+#检测repo文件创建缓存
+def checkRepoMakeCache():
+ os.system('yum clean all')
+ os.system('yum makecache')
+ os_version_ret = platform.dist()
+ os_arch = platform.machine()
+ version = os_version_ret[1].split('.',-1)
+ ret = os.path.exists('/var/cache/dnf/UniontechOS-AppStream.solv')
+ if ret:
+ ret = os.path.exists('/var/cache/dnf/UniontechOS-BaseOS.solv')
+ if ret or re.fullmatch('7',version[0]):
+ return 0
+ else:
+ return 1
+ else:
+ if re.fullmatch('7',version[0]):
+ ret = os.path.exists('/var/cache/yum/%s/7/UniontechOS-AppStream/repomd.xml' % os_arch)
+ if ret:
+ return 0
+ return 1
+
+
+# 检测centos 8 系统上的 repo文件联通
+def checkRepoFileHttp(baseurl):
+ try:
+ with request.urlopen(baseurl) as file:
+ # print(file.status)
+ # print(file.reason)
+ if re.match('OK', file.reason):
+ return 0
+ except Exception as e:
+ if re.match('HTTP Error 404|[Errno 2]', str(e)):
+ return 1
+ elif re.match('[Errno 21]', str(e)):
+ return 0
+ else:
+ return 1
+
+
+def repoFileCheck(baseurl):
+ if re.match('file\:\/\/', baseurl):
+ path = re.sub('file://', '', baseurl)
+ if os.path.exists(path):
+ return 0
+ else:
+ return 1
+ try:
+ dst_status = urllib.request.urlopen(baseurl, timeout=5).code
+ return 0
+ except Exception as err:
+ return 1
+ pass
+
+def check_repo(data):
+ agent_os = get_agent_os()
+ if '7' in agent_os:
+ agent_os = 'centos7'
+ elif '8' in agent_os:
+ agent_os = 'centos8'
+ os_type = agent_os + '_' + platform.machine().strip('')
+ baseurl = json.loads(data).get(os_type)
+ if not baseurl:
+ baseurl = '1'
+ task_id = json.loads(data).get('task_id')
+ # 更新SQL任务状态
+ statue = 1
+ sql_task_statue(statue, task_id)
+ # 发送消息给Server更新任务流状态
+ post_server('task_start', task_id)
+ # 初始化去除旧的repo文件
+ init_remove_oldrepo()
+ # 传递baseurl配置repo文件
+ initRepoFile(baseurl)
+ # 建立软件源缓存,判断软件源是否可用
+ state = checkRepoMakeCache()
+ sql = ''
+ repo_state = -1
+ if state == 0:
+ repo_state = repoFileCheck(baseurl)
+ else:
+ repo_state = 1
+
+ sql = "UPDATE agent_info SET repo_status = {} WHERE agent_ip = '{}';".format(repo_state, get_local_ip())
+ try:
+ ret = DBHelper().execute(sql)
+ statue = 2
+ except:
+ statue = 2
+ sql_task_statue(statue, task_id)
+ sql_task_statue(statue, task_id)
+ post_server('task_close', task_id)
+ return 'success'
--
2.20.1

View File

@ -0,0 +1,37 @@
From 26c0cd76dff728aee9bb24aa23a62258eb76a1d8 Mon Sep 17 00:00:00 2001
From: lixin <lixinb@uniontech.com>
Date: Mon, 13 Nov 2023 17:15:51 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/index.py b/index.py
index a392531..06a44c3 100644
--- a/index.py
+++ b/index.py
@@ -204,6 +204,17 @@ def export_reports():
return Response(mod, content_type='application/json')
+@app.route('/get_page_data', methods=['GET', 'POST'])
+def get_page_data():
+ """
+ 定时获取可用空间页面数据
+ :return:
+ """
+ mod = check_methods()
+ if mod:
+ return Response(mod, content_type='application/json')
+
+
@app.route('/', methods=['GET', 'POST'])
def MT_index():
"""
--
2.20.1

View File

@ -0,0 +1,86 @@
From 0e49cc38358147a06f2ddcb0888553eb57e47274 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Tue, 14 Nov 2023 09:37:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=9D=E5=A7=8B=E5=8C=96re?=
=?UTF-8?q?pos=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/short_task.py | 46 ++++++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 17 deletions(-)
diff --git a/sysmig_agent/short_task.py b/sysmig_agent/short_task.py
index 4e4dae3..2ef4ac6 100644
--- a/sysmig_agent/short_task.py
+++ b/sysmig_agent/short_task.py
@@ -160,36 +160,48 @@ def init_remove_oldrepo():
os.remove(path_file)
-#初始化repo文件
+# 初始化repo文件
def initRepoFile(baseurl):
os_version_ret = platform.dist()
- version = os_version_ret[1].split('.',-1)
- reposdir = '/etc/yum.repos.d/'
+ version = os_version_ret[1].split('.', -1)
+ AGENT_OS = os_version_ret[0] + version[0]
+ if re.search('7', AGENT_OS):
+ reposdir = '/etc/yum.repos.d/'
+ else:
+ reposdir = '/etc/yum.repos.d/'
+ # reposdir = dnf.Base().conf.get_reposdir
h = 0
- if re.match('file:',baseurl):
- str0, path = baseurl.split('://',1)
+ if re.search('file', baseurl):
+ str0, path = baseurl.split('://', 1)
path = '/' + path.strip('/') + '/'
else:
- h = 1
- if re.fullmatch('8',version[0]):
- path_appstream = baseurl+'/AppStream'
- path_baseos = baseurl+'/BaseOS'
- path_310 = baseurl+'/kernel-3.10'
- path_419 = baseurl+'/kernel419'
- path_510 = baseurl+'/kernel510'
+ h = 1
+ if re.fullmatch('8', version[0]):
+ path_appstream = baseurl + '/AppStream'
+ path_baseos = baseurl + '/BaseOS'
+ path_310 = baseurl + '/kernel-3.10'
+ path_418 = baseurl + '/kernel-4.18'
+ path_419 = baseurl + '/kernel419'
+ path_510 = baseurl + '/kernel510'
- repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = '''+path_appstream.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-BaseOS]\nname = UniontechOS BaseOS\nbaseurl = '''+path_baseos.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-4.19.0]\nname = UniontechOS Kernel-4.19.0\nbaseurl = '''+path_419.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n[UniontechOS-kernel-5.10.0]\nname = UniontechOS Kernel-5.10.0\nbaseurl = '''+path_510.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n
+ repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = ''' + path_appstream.strip(
+ '\n') + '''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-BaseOS]\nname = UniontechOS BaseOS\nbaseurl = ''' + path_baseos.strip(
+ '\n') + '''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-4.18.0]\nname = UniontechOS Kernel-4.18.0\nbaseurl = ''' + path_418.strip(
+ '\n') + '''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n[UniontechOS-kernel-4.19.0]\nname = UniontechOS Kernel-4.19.0\nbaseurl = ''' + path_419.strip(
+ '\n') + '''\nenabled = 1\ngpgcheck = 0\nskip_if_unavailable = 1\n\n[UniontechOS-kernel-5.10.0]\nname = UniontechOS Kernel-5.10.0\nbaseurl = ''' + path_510.strip(
+ '\n') + '''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n\n
'''
else:
- path_310 = baseurl+'/kernel-3.10'
- repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = '''+baseurl.strip('\n')+'''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-3.10.0]\nname = UniontechOS Kernel-3.10.0\nbaseurl = '''+path_310.strip('\n')+'''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n
+ path_310 = baseurl + '/kernel-3.10'
+ repostr_uos = '''[UniontechOS-AppStream]\nname = UniontechOS AppStream\nbaseurl = ''' + baseurl.strip(
+ '\n') + '''\nenabled = 1\ngpgcheck = 0\n\n[UniontechOS-kernel-3.10.0]\nname = UniontechOS Kernel-3.10.0\nbaseurl = ''' + path_310.strip(
+ '\n') + '''\nenabled = 0\ngpgcheck = 0\nskip_if_unavailable = 1\n
'''
repofile = os.path.join(reposdir, 'switch-to-uos.repo')
- with open(repofile,'w') as f_repo:
+ with open(repofile, 'w') as f_repo:
f_repo.write(repostr_uos)
f_repo.close()
-
#检测repo文件创建缓存
def checkRepoMakeCache():
os.system('yum clean all')
--
2.20.1

Binary file not shown.

Binary file not shown.

View File

@ -1,22 +1,63 @@
Name: migration-tools
Version: 1.0.0
Release: 4
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
License: MulanPSL-2.0
Source0: ut-Migration-tools.tar.gz
Patch0: 0001-fix-export-error-and-no-migration-details-issue.patch
Patch1: 0002-fix-uefi-boot-failed.patch
Patch2: 0003-modify-grub-rules-to-match-NIC-name.patch
BuildArch: noarch
Name: migration-tools
Version: 1.0.3
Release: 19
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
Source1: requires.tar.gz
Source2: xlwt-1.3.0-py2.py3-none-any.whl
# patches
Patch001: 0001-download-the-rpm-package-in-the-system.patch
Patch002: 0002-get-information-before-migration.patch
Patch003: 0003-export-migration-check-report.patch
Patch004: 0004-complete-information-report-after-abi-detection.patch
Patch005: 0005-abi-detection-through-multi-threads.patch
Patch006: 0006-add-message-query-to-update-abi-process.patch
Patch007: 0007-start-task-to-check-migration.patch
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
Patch013: 0013-set-agent-migration-task.patch
Patch014: 0014-compare-with-request-agent-ip.patch
Patch015: 0015-agent-sends-the-task-after-receving-the-request.patch
Patch016: 0016-export-migration-log.patch
Patch017: 0017-add-task-to-check-repo.patch
Patch018: 0018-add-interface-in-agent.patch
Patch019: 0019-update-the-initilization-repo-file.patch
BuildArch: noarch
BuildRequires: systemd
%description
UOS Migration Software
%if 0%{?rhel} >= 7
%package -n migration-tools-agent
Summary: migration-tools-agent
License: MulanPSL-2.0
Requires: dnf
Requires: libabigail
Requires: python3
Requires: python3-flask
Requires: python3-paramiko
Requires: python3-requests
Requires: python3-xlrd
Requires: python3-xlwt
Requires: openssl
Requires: rsync
Requires: yum-utils
%description -n migration-tools-agent
Migration software agent side
%endif
%package -n migration-tools-server
Summary: migration-tools-server
License: MulanPSL-2.0
License: MulanPSL-2.0
Requires: python3
Requires: python3-pip
Requires: sshpass
Requires: python3-paramiko
Requires: python3-flask
Requires: python3-requests
@ -26,45 +67,400 @@ Migration software server side
%prep
%setup -c
%patch 0 -p1
%patch 1 -p1
%patch 2 -p1
%autosetup -p1
%if 0%{?openEuler}
mkdir -p agent-requires/
cp -f %SOURCE1 agent-requires/
cp -f %SOURCE2 agent-requires/
%endif
%install
rm -rf %{buildroot}
mkdir -p $RPM_BUILD_ROOT/usr/lib/migration-tools-server
mkdir -p $RPM_BUILD_ROOT/var/tmp/uos-migration
%{__mkdir_p} $RPM_BUILD_ROOT/etc/migration-tools
mkdir -p $RPM_BUILD_ROOT/etc/migration-tools
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
%{__cp} -r * $RPM_BUILD_ROOT/usr/lib/migration-tools-server/
cp -r ut-Migration-tools/* $RPM_BUILD_ROOT/usr/lib/migration-tools-server/
%if 0%{?rhel} >= 7
mkdir -p $RPM_BUILD_ROOT/usr/lib/migration-tools-agent
%{__cp} -r * $RPM_BUILD_ROOT/usr/lib/migration-tools-agent/
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/migration-tools-agent.service $RPM_BUILD_ROOT%{_unitdir}
%endif
# Install server config
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/migration-tools.conf $RPM_BUILD_ROOT/etc/migration-tools
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/uos-sysmig.conf $RPM_BUILD_ROOT/etc/migration-tools
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/migration-tools-server.service $RPM_BUILD_ROOT%{_unitdir}
%posttrans
%{_bindir}/systemctl daemon-reload
%post -n migration-tools-server
mkdir -p /etc/migration-tools
mkdir -p /var/tmp/uos-migration
cp -r /usr/lib/migration-tools-server/server/migration-tools-server.service /usr/lib/systemd/system/
pip3 install /usr/lib/migration-tools-server/agent-requires/xlwt-1.3.0-py2.py3-none-any.whl --no-cache-dir
chmod +x /usr/lib/migration-tools-server/server/start_webview.sh
ln -s /usr/lib/migration-tools-server/server/start_webview.sh /usr/bin/migration-tools
systemctl daemon-reload
systemctl restart migration-tools-server.service
systemctl enable migration-tools-server.service
ln -sf /usr/lib/migration-tools-server/server/start_webview.sh /usr/bin/migration-tools
%preun -n migration-tools-server
if [ $1 = 0 ];then
systemctl stop migration-tools-server.service
fi
%postun -n migration-tools-server
systemctl disable migration-tools-server.service
rm -rf /usr/lib/migration-tools-server/
rm -rf /usr/lib/migration-tools
rm -rf /usr/bin/migration-tools
rm -rf /usr/lib/systemd/system/migration-tools-server.service
%files -n migration-tools-server
/etc/migration-tools
/usr/lib/migration-tools-server
%{_unitdir}/migration-tools-server.service
%if 0%{?rhel} >= 7
%files -n migration-tools-agent
/etc/migration-tools
/usr/lib/migration-tools-agent
%{_unitdir}/migration-tools-agent.service
%endif
%changelog
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-19
- 0019-update-the-initilization-repo-file.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-18
- 0018-add-interface-in-agent.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-17
- 0017-add-task-to-check-repo.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-16
- 0016-export-migration-log.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-15
- 0015-agent-sends-the-task-after-receving-the-request.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-14
- 0014-compare-with-request-agent-ip.patch
* 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
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-11
- 0011-initializate-the-migration-status.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-10
- 0010-update-abi-result-to-database.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-9
- 0009-get-abi-detection-process.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-8
- 0008-add-system-migration-task.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-7
- 0007-start-task-to-check-migration.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-6
- 0006-add-message-query-to-update-abi-process.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-5
- 0005-abi-detection-through-multi-threads.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-4
- 0004-complete-information-report-after-abi-detection.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-3
- 0003-export-migration-check-report.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-2
- 0002-get-information-before-migration.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-1
- 0001-download-the-rpm-package-in-the-system.patch
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-0
- update to 1.0.3
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-84
- 0084-divide-detection-report-into-mutiple-sheet-pages.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-83
- 0083-add-basic-summary-information-to-the-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-82
- 0082-write-the-data-of-each-row-and-column-into-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-81
- 0081-add-interface-to-export-migration-check-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-80
- 0080-write-the-data-of-each-row-into-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-79
- 0079-get-agent-storage-information.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-78
- 0078-fill-in-the-data-in-the-checked-templace.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-77
- 0077-copy-from-unzip-rpm-diractory-and-system-file-to-compatility-diractory.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-76
- 0076-detection-storage-interface.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-75
- 0075-detection-basic-information-and-format-abi-compatibility-information-to-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-74
- 0074-detection-basic-system-information.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-73
- 0073-get-os-version-and-os-id.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-72
- 0072-count-the-total-number-of-abi-compatible-lists.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-71
- 0071-get-package-list-from-repository.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-70
- 0070-interface-for-obtaining-repo-interface.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-69
- 0069-get-package-list-downloaded-locally-from-the-software-repository.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-68
- 0068-get-file-list-and-provide-file-path-to-compare.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-67
- 0067-add-an-abi-comparation-function.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-66
- 0066-check-if-file-is-binary.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-65
- 0065-get-checking-envirnmnet-process.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-64
- 0064-get-system-package-information-in-rpm-database.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-63
- 0063-add-compare-with-package-result-in-abi-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-62
- 0062-add-detection-ELF-content-in-abi-file.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-61
- 0061-detection-abi-log.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-60
- 0060-add-four-detection-item-to-abi-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-59
- 0059-add-kernel-detection-result-to-abi-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-58
- 0058-get-detection-envirnment-process-interface.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-57
- 0057-abi-basic-data-for-report.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-56
- 0056-modify-detection-envirnment-interface.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-55
- 0055-add-envirnment-detection-interface-before-migration.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-54
- 0054-removed-detection-abi-script.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-53
- 0053-get-repository-detection-result.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-52
- 0052-increase-the-weight-of-abi-detection-result.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-51
- 0051-add-basic-system-detection-information-and-upload-the-database.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-50
- 0050-check-free-space-in-system-disk.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-49
- 0049-add-interface-to-check-repository-result.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-48
- 0048-server-send-kernel-detection-task.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-47
- 0047-check-kernel-version-in-repository.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-46
- 0046-agent-sends-task-update-requrst-to-the-server.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-45
- 0045-modify-repository-file.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-44
- 0044-migrate-in-myutiple-steps.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-43
- 0043-process-os-version-and-os-name.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-42
- 0042-get-initial-os-version-from-agent_info-interface.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-41
- 0041-get-migration-status-from-database.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-40
- 0040-intial-logfile-and-tmpfile.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-39
- 0039-repository-file-choose-kernel-version-to-migration.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-38
- 0038-obtain-kernel-data.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-37
- 0037-add-subprocess-function-and-loggin.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-36
- 0036-add-an-interface-to-obtain-kernel-information.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-35
- 0035-the-migration-process-can-choose-not-to-migrate-the-kernel.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-34
- 0034-add-centos7-and-centos8-migration-interface.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-33
- 0033-check-system-kernrel.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-32
- 0032-add-migration.py-to-migration-function.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-31
- 0031-migration-check-and-extract-macros.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-30
- 0030-system-information-import-info-the-database-after-migration.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-29
- 0029-json-and-list-format-interchange.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-28
- 0028-send-agent-task.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-27
- 0027-fix-grub-file-for-system-option.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-26
- 0026-create-repository-and-disable-local-repofile.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-25
- 0025-update-migration-status-to-database.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-24
- 0024-add-url-processing-function.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-23
- 0023-update-the-status-of-the-migration-phase.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-22
- 0022-udpate-agent-host-status-online.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-21
- 0021-get-agent-ip-interface.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-20
- 0020-get-task-process-and-migration-stage-information.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-19
- 0019-update-abi-result-to-database.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-18
- 0018-detection-of-imported-host-information-interface.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-17
- 0017-add-process-data-in-database.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-16
- 0016-get-local-ip-on-the-agent.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-15
- 0015-delete-host-information-interface.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-14
- 0014-modify-task-stream-interface.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-13
- 0013-display-agent-host-information.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-12
- 0012-add-agent_task-in-database.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-11
- 0011-replace-agent-with-func-diractory.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-10
- 0010-create-task-stream-interface.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-9
- 0009-add-task_stream-table-in-database.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-8
- 0008-add-agent_info-table-in-database.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-7
- 0007-add-function-to-import-machine.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-6
- 0006-add-loger-interface-function.patch
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-5
- add 0005-execution-sql-function.patch
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-4
- add 0004-connect-sql-function.patch
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-3
- add 0003-delete-redundant-code.patch
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-2
- add 0002-modify-excel-report-content.patch
* Thu Oct 31 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-1
- add 0001-stander-code.patch
* Tue Aug 27 2024 lihaipeng <lihaipeng@uniontech.com> - 1.0.1-7
- fix cancel button function in tool
* Tue Jul 09 2024 Wenhua Huang <huangwenhua@kylinos.cn> - 1.0.1-6
- add BuildRequires systemd
* Tue Apr 02 2024 lixin <lixinb@uniontech.com> - 1.0.1-5
- adjust the display sequence
* Mon Apr 01 2024 lixin <lixinb@uniontech.com> - 1.0.1-4
- modify description
* Mon Mar 18 2024 lixin <lixinb@uniontech.com> - 1.0.1-3
- fix stop service display failed
- update spec
* Mon Mar 11 2024 lixin <lixinb@uniontech.com> - 1.0.1-2
- fix : CVE-2024-24892
- use paramiko instead of sshpass to export migration log
- and data
* Tue Mar 05 2024 lixin <lixinb@uniontech.com> - 1.0.1-1
- Supports migrations to OpenEuler system using the web-based interface.
* Wed Sep 06 2023 lixin <lixinb@uniontech.com> - 1.0.0-4
- fix: fix uefi boot failed
- fix: modify grub rules to match NIC name after migration
@ -77,4 +473,4 @@ rm -rf /usr/lib/systemd/system/migration-tools-server.service
- fix no migration detail error
* Wed Aug 16 2023 lixin <lixinb@uniontech.com> - 1.0.0-1
- init
init

BIN
requires.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.