mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
Add "cluster matrix" mode and "ssh_hostname" parameter
- The "cluster matrix" command supports CSV mode via the --csv switch. - Add the optional ssh_hostname configuration parameter, which is required by "cluster matrix". - A corresponding ssh_hostname column has been added to the repl_nodes table and to the repl_show_nodes view.
This commit is contained in:
committed by
Ian Barwick
parent
77de5dbeeb
commit
9b5b9acb82
18
config.c
18
config.c
@@ -217,6 +217,7 @@ parse_config(t_configuration_options *options)
|
||||
memset(options->conninfo, 0, sizeof(options->conninfo));
|
||||
memset(options->barman_server, 0, sizeof(options->barman_server));
|
||||
memset(options->barman_config, 0, sizeof(options->barman_config));
|
||||
memset(options->ssh_hostname, 0, sizeof(options->ssh_hostname));
|
||||
options->failover = MANUAL_FAILOVER;
|
||||
options->priority = DEFAULT_PRIORITY;
|
||||
memset(options->node_name, 0, sizeof(options->node_name));
|
||||
@@ -316,6 +317,8 @@ parse_config(t_configuration_options *options)
|
||||
strncpy(options->barman_server, value, MAXLEN);
|
||||
else if (strcmp(name, "barman_config") == 0)
|
||||
strncpy(options->barman_config, value, MAXLEN);
|
||||
else if (strcmp(name, "ssh_hostname") == 0)
|
||||
strncpy(options->ssh_hostname, value, MAXLEN);
|
||||
else if (strcmp(name, "rsync_options") == 0)
|
||||
strncpy(options->rsync_options, value, QUERY_STR_LEN);
|
||||
else if (strcmp(name, "ssh_options") == 0)
|
||||
@@ -452,6 +455,10 @@ parse_config(t_configuration_options *options)
|
||||
PQconninfoFree(conninfo_options);
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: Sanity check ssh_hostname
|
||||
*/
|
||||
|
||||
if (config_errors.head != NULL)
|
||||
{
|
||||
exit_with_errors(&config_errors);
|
||||
@@ -620,6 +627,10 @@ reload_config(t_configuration_options *orig_options)
|
||||
PQfinish(conn);
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: Sanity check the new ssh_hostname
|
||||
*/
|
||||
|
||||
/*
|
||||
* No configuration problems detected - copy any changed values
|
||||
*
|
||||
@@ -648,6 +659,13 @@ reload_config(t_configuration_options *orig_options)
|
||||
config_changed = true;
|
||||
}
|
||||
|
||||
/* ssh_hostname */
|
||||
if (strcmp(orig_options->ssh_hostname, new_options.ssh_hostname) != 0)
|
||||
{
|
||||
strcpy(orig_options->ssh_hostname, new_options.ssh_hostname);
|
||||
config_changed = true;
|
||||
}
|
||||
|
||||
/* node */
|
||||
if (orig_options->node != new_options.node)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user