diff --git a/gpMgmt/bin/gpaddmirrors b/gpMgmt/bin/gpaddmirrors index 123d3945026..6fe0aea9595 100755 --- a/gpMgmt/bin/gpaddmirrors +++ b/gpMgmt/bin/gpaddmirrors @@ -14,5 +14,4 @@ from gppylib.programs.clsAddMirrors import * #------------------------------------------------------------------------- if __name__ == '__main__': - check_deployment_mode('gpaddmirrors') simple_main( GpAddMirrorsProgram.createParser, GpAddMirrorsProgram.createProgram) diff --git a/gpMgmt/bin/gpinitsystem b/gpMgmt/bin/gpinitsystem index 4f19196fff0..84a238fe767 100755 --- a/gpMgmt/bin/gpinitsystem +++ b/gpMgmt/bin/gpinitsystem @@ -2093,20 +2093,9 @@ CREATE_FTS() { fi } -CHECK_DEPLOYMENT_MODE() { - if [[ -n "${COORDINATOR_DIRECTORY}/${SEG_PREFIX}-1" && -f ${COORDINATOR_DIRECTORY}/${SEG_PREFIX}-1/postgresql.conf ]]; then - gp_cbdb_deploy=`grep gp_cbdb_deploy ${COORDINATOR_DIRECTORY}/${SEG_PREFIX}-1/postgresql.conf | awk -F= '{print $1}'` - deployment_mode=`grep gp_cbdb_deploy ${COORDINATOR_DIRECTORY}/${SEG_PREFIX}-1/postgresql.conf | awk -F= '{print $2}'` - if [[ ${gp_cbdb_deploy:0:1} != '#' && $deployment_mode == "'cloud'" ]]; then - ERROR_EXIT "[FATAL]:gpinitsystem is disabled in cloud mode." - fi - fi -} - #****************************************************************************** # Main Section #****************************************************************************** -CHECK_DEPLOYMENT_MODE trap 'ERROR_EXIT "[FATAL]:-Received INT or TERM signal"' INT TERM while getopts ":vaqe:c:l:-:p:m:h:n:s:P:S:b:DB:I:O:E:F:M:U:T:C" opt do diff --git a/gpMgmt/bin/gpmovemirrors b/gpMgmt/bin/gpmovemirrors index 8991c42f316..7daae009cc1 100755 --- a/gpMgmt/bin/gpmovemirrors +++ b/gpMgmt/bin/gpmovemirrors @@ -4,7 +4,7 @@ # # Copyright (c) EMC Inc 2010. All Rights Reserved. # -from gppylib.mainUtils import SimpleMainLock, ExceptionNoStackTraceNeeded, check_deployment_mode +from gppylib.mainUtils import SimpleMainLock, ExceptionNoStackTraceNeeded import os import sys @@ -55,7 +55,6 @@ The input file should be a plain text file with the format: An input file must be specified. """, ] -check_deployment_mode('gpmovemirrors') # ----------------------- Command line option parser ---------------------- diff --git a/gpMgmt/bin/gppylib/mainUtils.py b/gpMgmt/bin/gppylib/mainUtils.py index ff14de5ad77..98d42bddadc 100644 --- a/gpMgmt/bin/gppylib/mainUtils.py +++ b/gpMgmt/bin/gppylib/mainUtils.py @@ -466,10 +466,6 @@ def parseStatusLine(line, isStart = False, isStop = False): reasonStr = ":".join(reasonArr) 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) def check_fts(fts): fts_check_cmd= "ps -ef | awk '{print \$2, \$8}' | grep gpfts | grep -v grep" diff --git a/gpMgmt/bin/gprecoverseg b/gpMgmt/bin/gprecoverseg index 83165a1cd40..11db4c86b3f 100755 --- a/gpMgmt/bin/gprecoverseg +++ b/gpMgmt/bin/gprecoverseg @@ -10,11 +10,10 @@ if mirroring is configured and operational. # THIS IMPORT MUST COME FIRST # # import mainUtils FIRST to get python version check -from gppylib.mainUtils import simple_main, check_deployment_mode +from gppylib.mainUtils import simple_main from gppylib.programs.clsRecoverSegment import GpRecoverSegmentProgram if __name__ == '__main__': - check_deployment_mode('gprecoverseg') simple_main(GpRecoverSegmentProgram.createParser, GpRecoverSegmentProgram.createProgram, GpRecoverSegmentProgram.mainOptions()) diff --git a/gpMgmt/bin/gpstart b/gpMgmt/bin/gpstart index c5c0d4d5a00..6f6e8f6915e 100755 --- a/gpMgmt/bin/gpstart +++ b/gpMgmt/bin/gpstart @@ -927,5 +927,4 @@ class GpStart: if __name__ == '__main__': - check_deployment_mode('gpstart') simple_main(GpStart.createParser, GpStart.createProgram) diff --git a/gpMgmt/bin/gpstop b/gpMgmt/bin/gpstop index 6862e42ba90..f886cd431bd 100755 --- a/gpMgmt/bin/gpstop +++ b/gpMgmt/bin/gpstop @@ -978,6 +978,4 @@ class GpStop: is_external_fts=external_fts) if __name__ == '__main__': - if len(sys.argv) != 2 or sys.argv[1] != "-u": - check_deployment_mode("gpstop") simple_main(GpStop.createParser, GpStop.createProgram) diff --git a/gpMgmt/bin/lib/gp_bash_functions.sh b/gpMgmt/bin/lib/gp_bash_functions.sh index e7e9cf1d89b..9dcda937913 100755 --- a/gpMgmt/bin/lib/gp_bash_functions.sh +++ b/gpMgmt/bin/lib/gp_bash_functions.sh @@ -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 diff --git a/src/backend/cdb/cdbutil.c b/src/backend/cdb/cdbutil.c index 5af92fb69f1..a7e339adfc9 100644 --- a/src/backend/cdb/cdbutil.c +++ b/src/backend/cdb/cdbutil.c @@ -2142,7 +2142,6 @@ char *gp_etcd_account_id = NULL; char *gp_etcd_cluster_id = NULL; char *gp_etcd_namespace = NULL; char *gp_etcd_endpoints = NULL; -char *gp_cbdb_deploy = NULL; static etcdlib_endpoint_t etcd_endpoints[GP_ETCD_ENDPOINTS_NUM] = {0}; static int etcd_endpoints_num = 0; diff --git a/src/backend/utils/misc/guc_gp.c b/src/backend/utils/misc/guc_gp.c index a39e3702766..cf9ade25657 100644 --- a/src/backend/utils/misc/guc_gp.c +++ b/src/backend/utils/misc/guc_gp.c @@ -4726,16 +4726,6 @@ struct config_string ConfigureNamesString_gp[] = "localhost:2379", NULL, NULL, NULL }, - { - {"gp_cbdb_deploy", PGC_BACKEND, CUSTOM_OPTIONS, - gettext_noop("CBDB deploy environment setup."), - gettext_noop("This indicates the cbdb is deployed with onpromise or cloud environment. Default is onpromise"), - GUC_SUPERUSER_ONLY - }, - &gp_cbdb_deploy, - "onpromise", - NULL, NULL, NULL - }, #endif #ifdef ENABLE_IC_PROXY { diff --git a/src/include/cdb/cdbutil.h b/src/include/cdb/cdbutil.h index b2424b0efd6..3d4620c4d53 100644 --- a/src/include/cdb/cdbutil.h +++ b/src/include/cdb/cdbutil.h @@ -37,7 +37,6 @@ extern char *gp_etcd_account_id; extern char *gp_etcd_cluster_id; extern char *gp_etcd_namespace; extern char *gp_etcd_endpoints; -extern char *gp_cbdb_deploy; typedef struct GpSegConfigEntryForUDF { diff --git a/src/include/common/etcdutils.h b/src/include/common/etcdutils.h index 74520a8de23..beb144f6b02 100644 --- a/src/include/common/etcdutils.h +++ b/src/include/common/etcdutils.h @@ -32,7 +32,6 @@ #define GP_ETCD_ACCOUNT_ID_DEFAULT "00000000-0000-0000-0000-000000000000" #define GP_ETCD_CLUSTER_ID_DEFAULT "00000000-0000-0000-0000-000000000000" #define GP_ETCD_ENDPOINTS_DEFAULT "localhost:2379" -#define GP_CBDB_DEPLOY "onpromise" typedef struct etcdlib_endpoint { char *etcd_host; diff --git a/src/include/utils/unsync_guc_name.h b/src/include/utils/unsync_guc_name.h index 14db7340bf4..48898421d56 100644 --- a/src/include/utils/unsync_guc_name.h +++ b/src/include/utils/unsync_guc_name.h @@ -211,7 +211,6 @@ "gp_etcd_cluster_id", "gp_etcd_namespace", "gp_etcd_endpoints", - "gp_cbdb_deploy", #endif "gp_force_random_redistribution", "gp_gang_creation_retry_count",