Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gpinitsystem
Browse files Browse the repository at this point in the history
check if is is_external_fts in some places
fanfuxiaoran committed Jul 8, 2024
1 parent c87fc6d commit 296667b
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions gpMgmt/bin/gppylib/mainUtils.py
Original file line number Diff line number Diff line change
@@ -467,9 +467,10 @@ def parseStatusLine(line, isStart = False, isStop = False):
return reasonCode, reasonStr, started, dir

def check_deployment_mode(program_name):
deploymentMode = subprocess.check_output("gpconfig -s gp_cbdb_deploy | grep 'Coordinator value'| awk '{print $3}'", shell=True).decode().strip()
if deploymentMode == "cloud":
raise gp.GpError("%s is not supported in cloud deployment mode" % program_name)
if is_external_fts() is True:
deploymentMode = subprocess.check_output("gpconfig -s gp_cbdb_deploy | grep 'Coordinator value'| awk '{print $3}'", shell=True).decode().strip()
if deploymentMode == "cloud":
raise gp.GpError("%s is not supported in cloud deployment mode" % program_name)

def check_fts(fts):
fts_check_cmd= "ps -ef | awk '{print \$2, \$8}' | grep gpfts | grep -v grep"
2 changes: 1 addition & 1 deletion gpMgmt/bin/lib/gp_bash_functions.sh
Original file line number Diff line number Diff line change
@@ -802,7 +802,7 @@ BUILD_COORDINATOR_PG_HBA_FILE () {
$ECHO "host replication $USER_NAME $STANDBY_HOSTNAME trust" >> ${GP_DIR}/$PG_HBA
fi
fi
if [ "$CLUSTER_BOOT_MODE" = "PRODUCTION" ];then
if [ "$CLUSTER_BOOT_MODE" = "PRODUCTION" ] && [ $USE_EXTERNAL_FTS -ne 0 ];then
for fts in ${FTS_HOST_MACHINE_LIST[*]}
do
if [ ! "$FTS_HOST" = "$COORDINATOR_HOSTNAME" ];then

0 comments on commit 296667b

Please sign in to comment.