check-barman
check-barman copied to clipboard
WAL history file cannot be parsed and is causing an error
Hi,
I've encountered an error with check-barman for the actions last_wal and mssing_wal, that is caused by a WAL history file. The history file is created when the timeline changes. In my case this always occurs after performing a failover in a master/slave cluster managed by crm.
./check-barman.rb -a last_wal -s mypgcluster -w 5 -c 10
The check command is causing the following error:
/var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/wal_file.rb:109:in parse': name has to be exactly 24 chars (RBarman::InvalidWalFileNameError) from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:196:in
block in parse_wal_files_list'
from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:194:in each' from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:194:in
parse_wal_files_list'
from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:119:in wal_files' from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:71:in
block in backups'
from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:68:in each' from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:68:in
backups'
from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/cli_command.rb:54:in backup' from /var/lib/gems/1.9.1/gems/rbarman-0.0.15/lib/rbarman/backup.rb:298:in
by_id'
from ./check-barman.rb:84:in check_last_wal_received' from ./check-barman.rb:237:in
The error disappears if the 00000005.history is deleted and xlog rebuilded.