mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
Add "-o ConnectTimeout=10" as default in "ssh_options"
This commit is contained in:
22
configfile.c
22
configfile.c
@@ -254,9 +254,6 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
|||||||
*------------------------
|
*------------------------
|
||||||
*/
|
*/
|
||||||
options->use_replication_slots = false;
|
options->use_replication_slots = false;
|
||||||
memset(options->rsync_options, 0, sizeof(options->rsync_options));
|
|
||||||
memset(options->ssh_options, 0, sizeof(options->ssh_options));
|
|
||||||
strncpy(options->ssh_options, "-q", sizeof(options->ssh_options));
|
|
||||||
memset(options->replication_user, 0, sizeof(options->replication_user));
|
memset(options->replication_user, 0, sizeof(options->replication_user));
|
||||||
memset(options->pg_basebackup_options, 0, sizeof(options->pg_basebackup_options));
|
memset(options->pg_basebackup_options, 0, sizeof(options->pg_basebackup_options));
|
||||||
memset(options->restore_command, 0, sizeof(options->restore_command));
|
memset(options->restore_command, 0, sizeof(options->restore_command));
|
||||||
@@ -316,9 +313,18 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
|||||||
* barman settings
|
* barman settings
|
||||||
* ---------------
|
* ---------------
|
||||||
*/
|
*/
|
||||||
|
memset(options->barman_host, 0, sizeof(options->barman_host));
|
||||||
memset(options->barman_server, 0, sizeof(options->barman_server));
|
memset(options->barman_server, 0, sizeof(options->barman_server));
|
||||||
memset(options->barman_config, 0, sizeof(options->barman_config));
|
memset(options->barman_config, 0, sizeof(options->barman_config));
|
||||||
|
|
||||||
|
/*-------------------
|
||||||
|
* rsync/ssh settings
|
||||||
|
* ------------------
|
||||||
|
*/
|
||||||
|
memset(options->rsync_options, 0, sizeof(options->rsync_options));
|
||||||
|
memset(options->ssh_options, 0, sizeof(options->ssh_options));
|
||||||
|
strncpy(options->ssh_options, "-q -o ConnectTimeout=10", sizeof(options->ssh_options));
|
||||||
|
|
||||||
/*---------------------------
|
/*---------------------------
|
||||||
* undocumented test settings
|
* undocumented test settings
|
||||||
*---------------------------
|
*---------------------------
|
||||||
@@ -422,10 +428,6 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
|||||||
/* standby clone settings */
|
/* standby clone settings */
|
||||||
else if (strcmp(name, "use_replication_slots") == 0)
|
else if (strcmp(name, "use_replication_slots") == 0)
|
||||||
options->use_replication_slots = parse_bool(value, name, error_list);
|
options->use_replication_slots = parse_bool(value, name, error_list);
|
||||||
else if (strcmp(name, "rsync_options") == 0)
|
|
||||||
strncpy(options->rsync_options, value, MAXLEN);
|
|
||||||
else if (strcmp(name, "ssh_options") == 0)
|
|
||||||
strncpy(options->ssh_options, value, MAXLEN);
|
|
||||||
else if (strcmp(name, "pg_basebackup_options") == 0)
|
else if (strcmp(name, "pg_basebackup_options") == 0)
|
||||||
strncpy(options->pg_basebackup_options, value, MAXLEN);
|
strncpy(options->pg_basebackup_options, value, MAXLEN);
|
||||||
else if (strcmp(name, "tablespace_mapping") == 0)
|
else if (strcmp(name, "tablespace_mapping") == 0)
|
||||||
@@ -527,6 +529,12 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
|||||||
else if (strcmp(name, "barman_config") == 0)
|
else if (strcmp(name, "barman_config") == 0)
|
||||||
strncpy(options->barman_config, value, MAXLEN);
|
strncpy(options->barman_config, value, MAXLEN);
|
||||||
|
|
||||||
|
/* rsync/ssh settings */
|
||||||
|
else if (strcmp(name, "rsync_options") == 0)
|
||||||
|
strncpy(options->rsync_options, value, MAXLEN);
|
||||||
|
else if (strcmp(name, "ssh_options") == 0)
|
||||||
|
strncpy(options->ssh_options, value, MAXLEN);
|
||||||
|
|
||||||
/* undocumented settings for testing */
|
/* undocumented settings for testing */
|
||||||
else if (strcmp(name, "promote_delay") == 0)
|
else if (strcmp(name, "promote_delay") == 0)
|
||||||
options->promote_delay = repmgr_atoi(value, name, error_list, 1);
|
options->promote_delay = repmgr_atoi(value, name, error_list, 1);
|
||||||
|
|||||||
10
configfile.h
10
configfile.h
@@ -84,8 +84,6 @@ typedef struct
|
|||||||
|
|
||||||
/* standby action settings */
|
/* standby action settings */
|
||||||
bool use_replication_slots;
|
bool use_replication_slots;
|
||||||
char rsync_options[MAXLEN];
|
|
||||||
char ssh_options[MAXLEN];
|
|
||||||
char pg_basebackup_options[MAXLEN];
|
char pg_basebackup_options[MAXLEN];
|
||||||
char restore_command[MAXLEN];
|
char restore_command[MAXLEN];
|
||||||
TablespaceList tablespace_mapping;
|
TablespaceList tablespace_mapping;
|
||||||
@@ -135,6 +133,10 @@ typedef struct
|
|||||||
char barman_server[MAXLEN];
|
char barman_server[MAXLEN];
|
||||||
char barman_config[MAXLEN];
|
char barman_config[MAXLEN];
|
||||||
|
|
||||||
|
/* rsync/ssh settings */
|
||||||
|
char rsync_options[MAXLEN];
|
||||||
|
char ssh_options[MAXLEN];
|
||||||
|
|
||||||
/* undocumented test settings */
|
/* undocumented test settings */
|
||||||
int promote_delay;
|
int promote_delay;
|
||||||
} t_configuration_options;
|
} t_configuration_options;
|
||||||
@@ -150,7 +152,7 @@ typedef struct
|
|||||||
/* log settings */ \
|
/* log settings */ \
|
||||||
"", "", "", DEFAULT_LOG_STATUS_INTERVAL, \
|
"", "", "", DEFAULT_LOG_STATUS_INTERVAL, \
|
||||||
/* standby action settings */ \
|
/* standby action settings */ \
|
||||||
false, "", "", "", "", { NULL, NULL }, "", false, \
|
false, "", "", { NULL, NULL }, "", false, \
|
||||||
/* node check settings */ \
|
/* node check settings */ \
|
||||||
DEFAULT_ARCHIVE_READY_WARNING, DEFAULT_ARCHIVE_READY_CRITICAL, \
|
DEFAULT_ARCHIVE_READY_WARNING, DEFAULT_ARCHIVE_READY_CRITICAL, \
|
||||||
DEFAULT_REPLICATION_LAG_WARNING, DEFAULT_REPLICATION_LAG_CRITICAL, \
|
DEFAULT_REPLICATION_LAG_WARNING, DEFAULT_REPLICATION_LAG_CRITICAL, \
|
||||||
@@ -171,6 +173,8 @@ typedef struct
|
|||||||
"", "", { NULL, NULL }, \
|
"", "", { NULL, NULL }, \
|
||||||
/* barman settings */ \
|
/* barman settings */ \
|
||||||
"", "", "", \
|
"", "", "", \
|
||||||
|
/* rsync/ssh settings */ \
|
||||||
|
"", "", \
|
||||||
/* undocumented test settings */ \
|
/* undocumented test settings */ \
|
||||||
0 \
|
0 \
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
#pg_ctl_options='' # Options to append to "pg_ctl"
|
#pg_ctl_options='' # Options to append to "pg_ctl"
|
||||||
#pg_basebackup_options='' # Options to append to "pg_basebackup"
|
#pg_basebackup_options='' # Options to append to "pg_basebackup"
|
||||||
#rsync_options='' # Options to append to "rsync"
|
#rsync_options='' # Options to append to "rsync"
|
||||||
ssh_options='-q' # Options to append to "ssh"
|
ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user