适配dorado双集群启动,增加-z参数
This commit is contained in:
parent
795c353a3e
commit
2a6c246bb7
@ -50,4 +50,5 @@ enable_fence_dn = off #enable fence the d
|
||||
#if set to on, restart datenode after 30 seconds. otherwise, don't restart datanode.
|
||||
#default off
|
||||
event_triggers = ''
|
||||
dorado_cluster_mode = 0 # cluster run mode for double dorado storage scene, Valid value: 0-2
|
||||
############### must leave a new line at the end ###################
|
||||
|
@ -356,7 +356,8 @@ void ReloadParametersFromConfig()
|
||||
if (g_enableE2ERto == 1) {
|
||||
agent_phony_dead_check_interval = 1;
|
||||
}
|
||||
|
||||
g_doradoClusterMode =
|
||||
(DoradoClusterMode)get_uint32_value_from_config(configDir, "dorado_cluster_mode", SS_DORADO_NULL);
|
||||
log_threshold_check_interval =
|
||||
get_uint32_value_from_config(configDir, "log_threshold_check_interval", log_threshold_check_interval);
|
||||
undocumentedVersion = get_uint32_value_from_config(configDir, "upgrade_from", 0);
|
||||
@ -409,7 +410,7 @@ void ReloadParametersFromConfigfile()
|
||||
" enableLogCompress=%s, security_mode=%s, incremental_build=%d, unix_socket_directory=%s, "
|
||||
#ifndef ENABLE_MULTIPLE_NODES
|
||||
"enable_e2e_rto=%u, disaster_recovery_type=%d, environment_threshold=%s, "
|
||||
"db_service_vip=%s, enable_fence_dn=%s\n",
|
||||
"db_service_vip=%s, enable_fence_dn=%s, dorado_cluster_mode=%d\n",
|
||||
#else
|
||||
"enable_e2e_rto=%u, disaster_recovery_type=%d, environment_threshold=%s\n",
|
||||
#endif
|
||||
@ -439,7 +440,8 @@ void ReloadParametersFromConfigfile()
|
||||
#ifndef ENABLE_MULTIPLE_NODES
|
||||
g_environmentThreshold,
|
||||
g_dbServiceVip,
|
||||
g_enableFenceDn);
|
||||
g_enableFenceDn,
|
||||
g_doradoClusterMode);
|
||||
#else
|
||||
g_environmentThreshold);
|
||||
#endif
|
||||
|
@ -150,6 +150,7 @@ uint32 dilatation_shard_count_for_disk_capacity_alarm = 1;
|
||||
uint32 g_cnAutoRepairDelay = 0;
|
||||
uint32 agent_phony_dead_check_interval = 10;
|
||||
DisasterRecoveryType g_disasterRecoveryType = DISASTER_RECOVERY_NULL;
|
||||
DoradoClusterMode g_doradoClusterMode = SS_DORADO_NULL;
|
||||
/* T status agent check phony dead inteval */
|
||||
uint32 g_agentCheckTStatusInterval = 36;
|
||||
uint32 enable_gtm_phony_dead_check = 1;
|
||||
|
@ -76,6 +76,9 @@ status_t StartOneResInst(const CmResConfList *conf)
|
||||
if (conf->resType == CUSTOM_RESOURCE_DN && undocumentedVersion > 0) {
|
||||
ret = snprintf_s(oper, MAX_OPTION_LEN, MAX_OPTION_LEN - 1, "-start %u %s '-u %u'", conf->resInstanceId,
|
||||
conf->arg, undocumentedVersion);
|
||||
} else if (conf->resType == CUSTOM_RESOURCE_DN && g_doradoClusterMode != SS_DORADO_NULL) {
|
||||
ret = snprintf_s(oper, MAX_OPTION_LEN, MAX_OPTION_LEN - 1, "-start %u %s '-z %s'", conf->resInstanceId,
|
||||
conf->arg, type_int_to_str_dorado(g_doradoClusterMode));
|
||||
} else {
|
||||
ret = snprintf_s(oper, MAX_OPTION_LEN, MAX_OPTION_LEN - 1, "-start %u %s", conf->resInstanceId, conf->arg);
|
||||
}
|
||||
|
@ -1449,6 +1449,8 @@ int get_agent_global_params_from_configfile()
|
||||
g_disasterRecoveryType =
|
||||
(DisasterRecoveryType)get_uint32_value_from_config(configDir, "disaster_recovery_type", DISASTER_RECOVERY_NULL);
|
||||
agent_phony_dead_check_interval = g_enableE2ERto == 1 ? 1 : agent_phony_dead_check_interval;
|
||||
g_doradoClusterMode =
|
||||
(DoradoClusterMode)get_uint32_value_from_config(configDir, "dorado_cluster_mode", SS_DORADO_NULL);
|
||||
|
||||
log_threshold_check_interval =
|
||||
get_uint32_value_from_config(configDir, "log_threshold_check_interval", log_threshold_check_interval);
|
||||
|
@ -308,6 +308,18 @@ const char* type_int_to_string(int type)
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
const char *type_int_to_str_dorado(DoradoClusterMode dorado_type)
|
||||
{
|
||||
switch (dorado_type) {
|
||||
case SS_DORADO_PRIMARY:
|
||||
return "cluster_primary";
|
||||
case SS_DORADO_STANDBY:
|
||||
return "cluster_standby";
|
||||
default:
|
||||
return "no_dorado_double_cluster";
|
||||
}
|
||||
}
|
||||
|
||||
gtm_con_string gtm_con_map_string[] = {{"Connection ok", CON_OK},
|
||||
{"Connection bad", CON_BAD},
|
||||
{"Connection started", CON_STARTED},
|
||||
|
@ -56,14 +56,14 @@ const char *g_cmaParamInfo[] = {
|
||||
"agent_rhb_interval|int|0,2147483647|NULL|NULL|",
|
||||
#ifndef ENABLE_MULTIPLE_NODES
|
||||
"enable_fence_dn|string|0,0|NULL|NULL|",
|
||||
#endif
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
#else
|
||||
"enable_cn_auto_repair|bool|0,0|NULL|NULL|",
|
||||
"enable_gtm_phony_dead_check|int|0,1|NULL|NULL|",
|
||||
"environment_threshold|string|0,0|NULL|NULL|",
|
||||
#endif
|
||||
"db_service_vip|string|0,0|NULL|NULL|",
|
||||
"event_triggers|string|0,0|NULL|NULL|"
|
||||
"event_triggers|string|0,0|NULL|NULL|",
|
||||
"dorado_cluster_mode|int|0,2|NULL|NULL|",
|
||||
};
|
||||
|
||||
const char *g_cmsParamInfo[] = {
|
||||
|
@ -231,6 +231,7 @@ extern uint32 g_dnBuildCheckTimes[CM_MAX_DATANODE_PER_NODE];
|
||||
extern uint32 g_nodeIndexForCmServer[CM_PRIMARY_STANDBY_NUM];
|
||||
extern uint32 g_enableE2ERto;
|
||||
extern DisasterRecoveryType g_disasterRecoveryType;
|
||||
extern DoradoClusterMode g_doradoClusterMode;
|
||||
|
||||
extern int g_cmShutdownLevel; /* cm_ctl stop single instance, single node or all nodes */
|
||||
extern ShutdownMode g_cmShutdownMode; /* fast shutdown */
|
||||
|
@ -229,6 +229,7 @@ extern const char* datanode_wal_send_state_int_to_string(int dbstate);
|
||||
|
||||
extern const char* datanode_dbstate_int_to_string(int dbstate);
|
||||
extern const char* type_int_to_string(int type);
|
||||
extern const char* type_int_to_str_dorado(DoradoClusterMode dorado_type);
|
||||
const char* gtm_con_int_to_string(int con);
|
||||
extern const char* datanode_role_int_to_string(int role);
|
||||
extern const char* datanode_static_role_int_to_string(uint32 role);
|
||||
|
@ -635,6 +635,12 @@ typedef enum {
|
||||
INSTALL_TYPE_STREAMING = 2
|
||||
} ClusterInstallType;
|
||||
|
||||
typedef enum {
|
||||
SS_DORADO_NULL = 0,
|
||||
SS_DORADO_PRIMARY = 1,
|
||||
SS_DORADO_STANDBY = 2
|
||||
} DoradoClusterMode;
|
||||
|
||||
typedef struct ctl_to_cm_set_st {
|
||||
int msg_type;
|
||||
int log_level;
|
||||
|
Loading…
x
Reference in New Issue
Block a user