!12 om 大版本升级bug修复

Merge pull request !12 from gyt0221/master
This commit is contained in:
opengauss-bot 2020-12-30 19:48:19 +08:00 committed by Gitee
commit 4503f6d37b
10 changed files with 56 additions and 8 deletions

View File

@ -29,6 +29,16 @@ import time
import pwd
import grp
import pickle
package_path = os.path.dirname(os.path.realpath(__file__))
ld_path = package_path + "/gspylib/clib"
if 'LD_LIBRARY_PATH' not in os.environ:
os.environ['LD_LIBRARY_PATH'] = ld_path
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
if not os.environ.get('LD_LIBRARY_PATH').startswith(ld_path):
os.environ['LD_LIBRARY_PATH'] = \
ld_path + ":" + os.environ['LD_LIBRARY_PATH']
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
import xml.etree.cElementTree as ETree
from itertools import combinations
from datetime import datetime, timedelta

View File

@ -21,6 +21,15 @@
import os
import sys
package_path = os.path.dirname(os.path.realpath(__file__))
ld_path = package_path + "/gspylib/clib"
if 'LD_LIBRARY_PATH' not in os.environ:
os.environ['LD_LIBRARY_PATH'] = ld_path
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
if not os.environ.get('LD_LIBRARY_PATH').startswith(ld_path):
os.environ['LD_LIBRARY_PATH'] = \
ld_path + ":" + os.environ['LD_LIBRARY_PATH']
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
sys.path.append(sys.path[0])
from gspylib.common.GaussLog import GaussLog

View File

@ -31,7 +31,7 @@ ld_path = package_path + "/gspylib/clib"
if 'LD_LIBRARY_PATH' not in os.environ:
os.environ['LD_LIBRARY_PATH'] = ld_path
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
if ld_path not in os.environ.get('LD_LIBRARY_PATH'):
if not os.environ.get('LD_LIBRARY_PATH').startswith(ld_path):
os.environ['LD_LIBRARY_PATH'] = \
ld_path + ":" + os.environ['LD_LIBRARY_PATH']
os.execve(os.path.realpath(__file__), sys.argv, os.environ)

View File

@ -318,9 +318,9 @@ General options:
ld_path = package_path + "/gspylib/clib"
rerun = True
if not 'LD_LIBRARY_PATH' in os.environ:
if 'LD_LIBRARY_PATH' not in os.environ:
os.environ['LD_LIBRARY_PATH'] = ld_path
elif not ld_path in os.environ.get('LD_LIBRARY_PATH'):
elif not os.environ.get('LD_LIBRARY_PATH').startswith(ld_path):
os.environ['LD_LIBRARY_PATH'] = \
ld_path + ":" + os.environ['LD_LIBRARY_PATH']
else:

View File

@ -20,6 +20,15 @@
#############################################################################
import os
import sys
package_path = os.path.dirname(os.path.realpath(__file__))
ld_path = package_path + "/gspylib/clib"
if 'LD_LIBRARY_PATH' not in os.environ:
os.environ['LD_LIBRARY_PATH'] = ld_path
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
if not os.environ.get('LD_LIBRARY_PATH').startswith(ld_path):
os.environ['LD_LIBRARY_PATH'] = \
ld_path + ":" + os.environ['LD_LIBRARY_PATH']
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
from gspylib.common.GaussLog import GaussLog
from gspylib.common.Common import DefaultValue

View File

@ -33,6 +33,16 @@ import grp
import socket
import getpass
import shutil
package_path = os.path.dirname(os.path.realpath(__file__))
ld_path = package_path + "/gspylib/clib"
if 'LD_LIBRARY_PATH' not in os.environ:
os.environ['LD_LIBRARY_PATH'] = ld_path
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
if not os.environ.get('LD_LIBRARY_PATH').startswith(ld_path):
os.environ['LD_LIBRARY_PATH'] = \
ld_path + ":" + os.environ['LD_LIBRARY_PATH']
os.execve(os.path.realpath(__file__), sys.argv, os.environ)
from gspylib.common.GaussLog import GaussLog
from gspylib.common.ErrorCode import ErrorCode
from gspylib.threads.parallelTool import parallelTool

View File

@ -236,7 +236,8 @@ class CheckResult(object):
for itemResult in self._items:
resultDic['name'] = itemResult.name
resultDic['category'] = itemResult.category
resultDic['std'] = itemResult.standard.decode('utf-8', 'ignore')
resultDic['std'] = "" if itemResult.standard.strip() == "" \
else itemResult.standard.decode('utf-8', 'ignore')
resultDic['rst'] = itemResult.rst
resultDic['analysis'] = itemResult.analysis
resultDic['suggestion'] = itemResult.suggestion

View File

@ -66,8 +66,8 @@ class CheckNICModel(BaseItem):
cmd = "lspci |grep %s" % PCIAddr
(status, output) = subprocess.getstatusoutput(cmd)
self.result.raw += "%s\n" % (output)
if (status == 0 and len(output.split(':')) == 3):
modelInfo = output.split(':')[2].split('(')[0]
if status == 0 and len(output.split(':')) >= 3:
modelInfo = ':'.join(output.split(':')[2:]).split('(')[0]
self.result.val += "model: %s\n" % (modelInfo.strip())
else:
self.result.val += "Failed to get NIC %s model" \

View File

@ -497,7 +497,16 @@ def syncPostgresqlconf(dbInstance):
'node_group_mode', 'segment_size',
'server_encoding', 'server_version',
'server_version_num', 'sql_compatibility',
'wal_block_size', 'wal_segment_size']
'wal_block_size', 'wal_segment_size', 'enable_beta_nestloop_fusion',
'enable_upsert_to_merge', 'force_parallel_mode',
'max_background_workers', 'max_parallel_workers_per_gather',
'min_parallel_table_scan_size', 'pagewriter_threshold',
'parallel_leader_participation', 'parallel_setup_cost',
'parallel_tuple_cost', 'parctl_min_cost', 'tcp_recv_timeout',
'wal_compression', 'enable_parallel_hash', 'enable_parallel_append',
'max_parallel_maintenance_workers', 'min_parallel_index_scan_size',
'sync_config_strategy', 'wal_file_init_num', 'wal_writer_cpu',
'xlog_flush_uplimit', 'xlog_idle_flushes_before_sleep']
for gucName in internalGucList:
if gucName in gucParamDict.keys():
del gucParamDict[gucName]

View File

@ -106,7 +106,7 @@ function fn_get_openGauss_tar()
then
url="https://opengauss.obs.cn-south-1.myhuaweicloud.com/1.1.0/${system_arch}/openGauss-1.1.0-${system_name}-64bit-all.tar.gz"
echo "Downloading openGauss tar from official website at ${install_tar}"
wget $url --timeout=30 --tries=3 && tar -zxvf openGauss-1.1.0-${system_name}-64bit-all.tar.gz
wget $url --timeout=30 --tries=3 && tar -zxf openGauss-1.1.0-${system_name}-64bit-all.tar.gz
if [ $? -ne 0 ]
then
echo "wget error. The $install_tar need openGauss-1.1.0-${system_name}-64bit-om.tar.gz"