Add error code ERR_BARMAN

Indicates unrecoverable error condition when accessing the barman server
This commit is contained in:
Ian Barwick
2016-08-31 11:39:48 +09:00
parent a8afa843ee
commit 1d05345aa3
3 changed files with 7 additions and 8 deletions

View File

@@ -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

View File

@@ -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_ */

View File

@@ -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);
}
/*