diff --git a/README.md b/README.md index a69b527e..afdf7744 100644 --- a/README.md +++ b/README.md @@ -1584,6 +1584,7 @@ exit: * ERR_MONITORING_FAIL (16) Unrecoverable error encountered during monitoring (repmgrd only) * ERR_BAD_BACKUP_LABEL (17) Corrupt or unreadable backup label encountered (repmgr only) * ERR_SWITCHOVER_FAIL (18) Error encountered during switchover (repmgr only) +* ERR_BARMAN (19) Unrecoverable error while accessing the barman server (repmgr only) Support and Assistance diff --git a/errcode.h b/errcode.h index d190bf0b..45c43c77 100644 --- a/errcode.h +++ b/errcode.h @@ -38,5 +38,6 @@ #define ERR_MONITORING_FAIL 16 #define ERR_BAD_BACKUP_LABEL 17 #define ERR_SWITCHOVER_FAIL 18 +#define ERR_BARMAN 19 #endif /* _ERRCODE_H_ */ diff --git a/repmgr.c b/repmgr.c index 946bb29d..430f96d7 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1868,8 +1868,7 @@ do_standby_clone(void) options.barman_server); log_hint(_("Refer to the Barman documentation for more information\n")); - // ERR_BARMAN - exit(ERR_INTERNAL); + exit(ERR_BARMAN); } /* @@ -1904,8 +1903,7 @@ do_standby_clone(void) { log_err(_("Unable to fetch server parameters from Barman server\n")); - // ERR_BARMAN - exit(ERR_INTERNAL); + exit(ERR_BARMAN); } } @@ -2054,8 +2052,7 @@ do_standby_clone(void) { log_err(_("Unable to parse barman conninfo string \"%s\":\n%s\n"), barman_conninfo_str, errmsg); - // ERR_BARMAN - exit(ERR_BAD_CONFIG); + exit(ERR_BARMAN); } /* Overwrite database name in the parsed parameter list */ @@ -2384,7 +2381,7 @@ do_standby_clone(void) if (fi == NULL) { log_err("Cannot launch command: %s\n", command); - exit(ERR_INTERNAL); + exit(ERR_BARMAN); } fd = fopen(datadir_list_filename, "w"); @@ -2405,7 +2402,7 @@ do_standby_clone(void) { log_err("Unexpected output from \"barman list-files\": %s\n", output); - exit(ERR_INTERNAL); + exit(ERR_BARMAN); } /*