适用范围
openEuler-22.03-LTS + opengauss5.0.1
问题概述
执行下面命令gs_preinstall陷入死循环,一直等待,没有结果
[root@openeuler161 script]# script/gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml
问题原因
执行gs_preinstall时,需要python赖包,openEuler-22.03自带python3.9版本,没有paramiko及依赖包
check_python_version()
check_python_compiler_option()
from base_utils.os.file_util import FileUtil
if "--unused-third-party" in sys.argv:
package_path = os.path.dirname(os.path.realpath(__file__))
lib_path = os.path.join(package_path, "..", "lib")
clib_files = os.path.join(package_path, "gspylib/clib/*.so*")
FileUtil.cleanDirectoryContent(lib_path)
FileUtil.removeFile(clib_files)
# use system pip dependecies
import psutil
import netifaces
import cryptography
import paramiko
from gspylib.common.GaussLog import GaussLog
from gspylib.common.Common import DefaultValue
from gspylib.common.ErrorCode import ErrorCode
from gspylib.common.ParallelBaseOM import ParallelBaseOM
导入paramiko包报没有
[root@localhost ~]# cat /etc/openEuler-latest
openeulerversion=openEuler-22.03-LTS
compiletime=2022-03-30-16-23-56
gccversion=10.3.1-10.oe2203
kernelversion=5.10.0-60.18.0.50.oe2203
openjdkversion=1.8.0.312.b07-11.oe2203
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# python3
Python 3.9.9 (main, Mar 15 2022, 00:00:00)
[GCC 10.3.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'paramiko'
执行gs_preinstall时会一直不进行下去
[root@openeuler161 script]# script/gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml
解决方案
1、安装paramiko包及相关的依赖包
[root@openeuler161 script]# pip3 install paramiko==3.4.0
[root@openeuler161 script]# pip3 install paramiko==3.4.0
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Looking in indexes: http://mirrors.aliyun.com/pypi/simple
Requirement already satisfied: paramiko==3.4.0 in /usr/local/lib/python3.9/site-packages (3.4.0)
Requirement already satisfied: cryptography>=3.3 in /usr/local/lib64/python3.9/site-packages (from paramiko==3.4.0) (42.0.7)
Requirement already satisfied: bcrypt>=3.2 in /usr/local/lib64/python3.9/site-packages (from paramiko==3.4.0) (4.1.3)
Requirement already satisfied: pynacl>=1.5 in /usr/local/lib64/python3.9/site-packages (from paramiko==3.4.0) (1.5.0)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib64/python3.9/site-packages (from cryptography>=3.3->paramiko==3.4.0) (1.16.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.3->paramiko==3.4.0) (2.22
2、重新执行gs_preinstall
[root@openeuler161 script]# ./gs_preinstall -U omm -G dbgrp -X ../cluster_ms.xml
Parsing the configuration file.
Successfully parsed the configuration file.
Installing the tools on the local node.
Successfully installed the tools on the local node.
Are you sure you want to create trust for root (yes/no)?yes
Please enter password for root
Password:
Successfully created SSH trust for the root permission user.
Setting host ip env
Successfully set host ip env.
Distributing package.
Begin to distribute package to tool path.
Successfully distribute package to tool path.
Begin to distribute package to package path.
Successfully distribute package to package path.
Successfully distributed package.
Are you sure you want to create the user[omm] and create trust for it (yes/no)? no
Preparing SSH service.
Successfully prepared SSH service.
Installing the tools in the cluster.
Successfully installed the tools in the cluster.
Checking hostname mapping.
Successfully checked hostname mapping.
Checking OS software.
Successfully check os software.
Checking OS version.
Successfully checked OS version.
Creating cluster's path.
Successfully created cluster's path.
Set and check OS parameter.
Setting OS parameters.
Successfully set OS parameters.
Warning: Installation environment contains some warning messages.
Please get more details by "/opt/software/openGauss/script/gs_checkos -i A -h openeuler161,openeuler162 --detail".
Set and check OS parameter completed.
Preparing CRON service.
Successfully prepared CRON service.
Setting user environmental variables.
Successfully set user environmental variables.
Setting the dynamic link library.
Successfully set the dynamic link library.
Setting Core file
Successfully set core path.
Setting pssh path
Successfully set pssh path.
Setting Cgroup.
Successfully set Cgroup.
Set ARM Optimization.
No need to set ARM Optimization.
Fixing server package owner.
Setting finish flag.
Successfully set finish flag.
Preinstallation succeeded.
[root@openeuler161 script]#
参考文档
https://gitee.com/opengauss/openGauss-OM/pulls/571