repmgr: disallow node ids which are not positive signed 32 bit integers

Fixes GitHub #280
This commit is contained in:
Ian Barwick
2017-03-20 11:22:09 +09:00
parent 1964f890be
commit 0916d8f2ad
3 changed files with 6 additions and 4 deletions

View File

@@ -391,7 +391,8 @@ least the following parameters:
- `cluster`: an arbitrary name for the replication cluster; this must be identical
on all nodes
- `node`: a unique integer identifying the node
- `node`: a unique integer identifying the node; note this must be a positive
32 bit signed integer between 1 and 2147483647
- `node_name`: a unique string identifying the node; we recommend a name
specific to the server (e.g. 'server_1'); avoid names indicating the
current replication role like 'master' or 'standby' as the server's

View File

@@ -448,6 +448,10 @@ _parse_config(t_configuration_options *options, ItemList *error_list)
{
item_list_append(error_list, _("\"node\": must be greater than zero"));
}
else if (options->node < 0)
{
item_list_append(error_list, _("\"node\": must be a positive signed 32 bit integer, i.e. 2147483647 or less"));
}
if (strlen(options->conninfo))
{

View File

@@ -1946,9 +1946,6 @@ do_master_register(void)
exit(ERR_BAD_CONFIG);
}
}
begin_transaction(conn);
/*