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