mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
repmgr: fix configuration file sanity check
The check was being carried out regardless of whether --copy-external-config-files was specified, which means cloning will fail if no SSH connection is available. Addresses GitHub #342
This commit is contained in:
@@ -359,7 +359,7 @@ do_standby_clone(void)
|
|||||||
* If copying of external configuration files requested, and any are
|
* If copying of external configuration files requested, and any are
|
||||||
* detected, perform sanity checks
|
* detected, perform sanity checks
|
||||||
*/
|
*/
|
||||||
if (PQstatus(source_conn) == CONNECTION_OK)
|
if (PQstatus(source_conn) == CONNECTION_OK && runtime_options.copy_external_config_files == true)
|
||||||
{
|
{
|
||||||
PGconn *superuser_conn = NULL;
|
PGconn *superuser_conn = NULL;
|
||||||
PGconn *privileged_conn = NULL;
|
PGconn *privileged_conn = NULL;
|
||||||
@@ -549,7 +549,7 @@ do_standby_clone(void)
|
|||||||
* This won't run in Barman mode as "config_files" is only populated in
|
* This won't run in Barman mode as "config_files" is only populated in
|
||||||
* "initialise_direct_clone()", which isn't called in Barman mode.
|
* "initialise_direct_clone()", which isn't called in Barman mode.
|
||||||
*/
|
*/
|
||||||
if (runtime_options.copy_external_config_files && config_files.entries)
|
if (runtime_options.copy_external_config_files == true && config_files.entries > 0)
|
||||||
{
|
{
|
||||||
copy_configuration_files();
|
copy_configuration_files();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user