Network failure with geographical redundancy breaks barman cron #202
If Geographical Redundancy is set up between two barman servers and for some reason the connection between the two nodes fails, successive
The fact that the execution is not processed for the node that the barman server can't connect to is fine, but the exception is not caught, and so any further processing of other postgres servers to backup isn't done.
This patch fixed the bug:
$ git diff diff --git a/barman/cli.py b/barman/cli.py index d559259..547b6e8 100644 --- a/barman/cli.py +++ b/barman/cli.py @@ -141,7 +141,10 @@ def cron(): # server is None and to report inactive and disabled servers, # but here we have only active and well configured servers. - server.cron() + try: + server.cron() + except: + output.error("Unable to run cron on server %s" % name) output.close_and_exit()