!271 优化设置om_root_path环境变量的位置
Merge pull request !271 from hangjin2020/master
This commit is contained in:
@ -356,7 +356,6 @@ class InstallImpl:
|
||||
self.installClusterApp()
|
||||
self.context.logger.log("begin init Instance..")
|
||||
self.initInstance()
|
||||
self.configZenithInst()
|
||||
self.context.logger.log("encrypt cipher and rand files "
|
||||
"for database.")
|
||||
initPasswd = self.getPasswdFromInitParam()
|
||||
@ -402,13 +401,6 @@ class InstallImpl:
|
||||
self.context.dbInitParam.pop(pwdIndex)
|
||||
return passwd
|
||||
|
||||
def configZenithInst(self):
|
||||
"""
|
||||
function: config zenith inst
|
||||
:return:
|
||||
"""
|
||||
pass
|
||||
|
||||
def initInstance(self):
|
||||
"""
|
||||
function: init instance
|
||||
|
||||
@ -451,12 +451,10 @@ class PreinstallImplOLAP(PreinstallImpl):
|
||||
if status != 0:
|
||||
self.context.logger.logExit("Command for set platform ARM:"
|
||||
"%s" % cmd + " Error: \n%s" % output)
|
||||
if str(output) == "aarch64":
|
||||
pass
|
||||
else:
|
||||
self.context.logger.log("No need to set ARM Optimization.",
|
||||
"constant")
|
||||
if output != "aarch64":
|
||||
self.context.logger.log("No need to set ARM Optimization.", "constant")
|
||||
return
|
||||
|
||||
try:
|
||||
# exec cmd for set platform ARM
|
||||
cmd = "%s -t %s -u %s -l %s -Q %s" % (
|
||||
|
||||
@ -1505,12 +1505,6 @@ Common options:
|
||||
"export LD_LIBRARY_PATH=$GPHOME/lib:$LD_LIBRARY_PATH"])
|
||||
# set PYTHONPATH
|
||||
FileUtil.writeFile(userProfile, ["export PYTHONPATH=$GPHOME/lib"])
|
||||
# set om root script path
|
||||
om_root_path = "%s/%s/script" % (DefaultValue.ROOT_SCRIPTS_PATH,
|
||||
self.user)
|
||||
FileUtil.writeFile(userProfile,
|
||||
["export PATH=%s:$PATH" % om_root_path])
|
||||
|
||||
except Exception as e:
|
||||
self.logger.logExit(str(e))
|
||||
self.logger.debug("Successfully set tool ENV.")
|
||||
@ -2472,6 +2466,10 @@ Common options:
|
||||
dest_path, recursive=True)
|
||||
|
||||
self.logger.debug("Delete root scripts in om user path.")
|
||||
|
||||
# set om root script path
|
||||
userProfile = self.getUserProfile()
|
||||
FileUtil.writeFile(userProfile, ["export PATH=%s:$PATH" % om_root_path])
|
||||
# delete root scripts in GPHOME
|
||||
om_user_path = os.path.join(self.clusterToolPath, "script")
|
||||
user_om_files = os.listdir(om_user_path)
|
||||
|
||||
Reference in New Issue
Block a user