【标题描述】:
【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:2.0.0】 问题描述
系统在安装openGauss数据库时出现问题,gs_preinstall执行卡住。安装包为官网对应架构和服务器下的安装包。
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
test@rabbitmq1:$ cat /etc/system-release$ uname -a
openEuler release 22.03 LTS
test@rabbitmq1:
Linux rabbitmq1 5.10.0-60.68.0.93.oe2203.aarch64 #1 SMP Wed Nov 23 14:49:18 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
服务器CPU:
test@rabbitmq1:~$ lscpu
Architecture: aarch64
CPU op-mode(s): 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Vendor ID: HiSilicon
Model name: Kunpeng-920
Model: 0
Thread(s) per core: 1
Core(s) per socket: 24
Socket(s): 2
Stepping: 0x1
Frequency boost: disabled
CPU max MHz: 2600.0000
CPU min MHz: 200.0000
BogoMIPS: 200.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm
Caches (sum of all):
L1d: 3 MiB (48 instances)
L1i: 3 MiB (48 instances)
L2: 24 MiB (48 instances)
L3: 48 MiB (2 instances)
NUMA:
NUMA node(s): 2
NUMA node0 CPU(s): 0-23
NUMA node1 CPU(s): 24-47
Vulnerabilities:
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec store bypass: Not affected
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Not affected
Srbds: Not affected
Tsx async abort: Not affected
内存信息:
test@rabbitmq1:~$ free -h
total used free shared buff/cache available
Mem: 124Gi 42Gi 77Gi 3.0Gi 4.3Gi 79Gi
Swap: 0B 0B 0B
【测试环境】(单机/1主x备x级联备):
单机
【被测功能】:
【测试类型】:
【数据库版本】(查询命令: gaussdb -V):
【预置条件】:
【操作步骤】(请填写详细的操作步骤):
【预期输出】:
安装成功
【实际输出】:
卡在执行gs_preinstall的安装命令:./gs_preinstall -U omm -G dbgrp -X ../../gauss.xml
且top看,python3一直在执行耗服务器资源
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
229275 root 20 0 5928 496 432 R 97.7 0.0 12:25.07 python3
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息):
安装过程中卡住,无日志文件
【测试代码】:
Hey @shalow_org, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss_bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Hi @shalow_org, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @xiangxinyong , @zhangxubo .
/sig om
Hi @shalow_org,
if you want to get quick review about your issue, please contact the owner in first: @Dawson ,
and then any of the maintainers: @Dawson , @coolany
and then any of the committers: @joker , @miffyrcee , @travelliu , @vimiix , @刘珲
if you have any question, please contact the SIG: OM.
这是获取的包不对,应该对应使用 2203的数据库版本。
卡主问题需要优化下
应该不会。我就是从https://opengauss.org/zh/download/官网上下载的最新的安装包。架构aarch64,操作系统选择openEuler22.03,5.0.0企业版
另外,换成对应的5.0.0的极简版是可以正常安装成功的。
您好,根据您的环境信息我们做了复现,根据目前已有信息认为该问题的主要原因为两点:
1.当前服务器环境的paramiko依赖的底层库或glibc不满足;
2.在尝试paramiko包导入try-catch中逻辑判断不当导致gs_preinstall循环启动;
报错链:
gs_preinstall中报错位置:from gspylib.common.ParallelBaseOM import ParallelBaseOM
ParallelBaseOM中报错位置:from gspylib.threads.SshTool import SshTool
SshTool报错语句块如下:
try:
import paramiko
except ImportError as ex:
try:
local_path = os.path.dirname(os.path.realpath(__file__))
clib_path = os.path.realpath(os.path.join(local_path, "../../gspylib/clib/"))
ld_path = os.getenv("LD_LIBRARY_PATH")
if not ld_path or not ld_path.startswith(clib_path):
if not ld_path:
os.environ['LD_LIBRARY_PATH'] = clib_path
else:
os.environ['LD_LIBRARY_PATH'] = clib_path + ":" + ld_path
try:
os.execl(sys.executable, sys.executable, *sys.argv)
except Exception as ex:
sys.exit("Failed to set the enviroment variable: %s" % str(ex))
import paramiko
except ImportError as ex:
raise Exception(ErrorCode.GAUSS_522["GAUSS_52200"] % str(ex))
代码本意为import paramiko
失败时,引入环境变量后使用os.execl
对脚本进行重启,从而保证导入库成功;
但如果paramiko
底层相关库版本不满足时,添加环境变量不会起效,从而反复执行os.execl
函数,导致循环报错;
并且相比5.1.0版本,该段代码将print(ex)
捕获异常输出删除,导致gs_preinstall死循环且无console输出;
解决方案:
在添加环境变量后直接尝试重启,如果环境变量重置后import仍然报错,则可被内层异常捕获直接退出,代码如下:
try:
import paramiko
except ImportError as ex:
try:
local_path = os.path.dirname(os.path.realpath(__file__))
clib_path = os.path.realpath(os.path.join(local_path, "../../gspylib/clib/"))
ld_path = os.getenv("LD_LIBRARY_PATH")
if not ld_path or not ld_path.startswith(clib_path):
if not ld_path:
os.environ['LD_LIBRARY_PATH'] = clib_path
else:
os.environ['LD_LIBRARY_PATH'] = clib_path + ":" + ld_path
try:
os.execl(sys.executable, sys.executable, *sys.argv)
except Exception as ex:
sys.exit("Failed to set the enviroment variable: %s" % str(ex))
import paramiko
except ImportError as ex:
raise Exception(ErrorCode.GAUSS_522["GAUSS_52200"] % str(ex))
应该不会。我就是从https://opengauss.org/zh/download/官网上下载的最新的安装包。架构aarch64,操作系统选择openEuler22.03,5.0.0企业版
另外,换成对应的5.0.0的极简版是可以正常安装成功的。
这里面是最近主干发布的转测包,您可以用这个试下安装能否成功
https://download.opengauss.org/archive_test/5.1.0/openGauss5.1.0.B014/arm_2203/
卡主问题在5.0.0发布后,修复了python版本以及架构引起gs_preinstall卡主的问题,您可以下这个看看是否能够安装成功。
9.6号发起公示,9.13号前无异议则问题关闭。
登录 后才可以发表评论