Skip to content

🐛 [BUG] - TPA/Barman not correctly configuring log_file parameter #243

@voxnyx

Description

@voxnyx

Description

When using TPA to setup and configure Barman. The variable barman_log_file configures to the /etc/barman.d/[servername].conf which throws the following warning:

WARNING: Invalid configuration option "log_file" in [banner-archive] section.

From what I can tell, log_file is not a valid key for a server config in Barman. I also see that in commit #63637b5 the default_barman_log_file variable is made and replaces barman_log_file in the barman.conf.j2 template.

I assume most deployments utilize the default log file location, however, I was attempting to utilize a custom directory for the log file. I was deploying EPAS, with Barman with the help of a EDB consultant when we discovered this issue.

tpaexec info

# TPAexec 23.38.0
tpaexec=/opt/EDB/TPA/bin/tpaexec
TPA_DIR=/opt/EDB/TPA
PYTHON=/opt/EDB/TPA/tpa-venv/bin/python3 (v3.12.10, venv)
TPA_VENV=/opt/EDB/TPA/tpa-venv
ANSIBLE=/opt/EDB/TPA/tpa-venv/bin/ansible (v2.16.14)
Validated: 11ab0e3377ec122ff610454c7a7194bd1995d8659eda12213ceb03f9ea7f6eaa [OK]

tpaexec configure or config.yml

---
architecture: M1
cluster_name: epas_tde
cluster_tags: {}
cluster_vars:
	apt_repository_list: []
	edb_repositories:
	- enterprise
	epas_redwood_compat: true
	failover_manager: none
	postgres_data_dir: /u01/edb/as16/data
	postgres_wal_dir: /u01/pgwaldata/as16/wal
	postgres_flavour: epas
	postgres_version: '16'
	preferred_python_version: python3
	use_volatile_subscriptions: false
	barman_home: '/backup/server1/backup' 
	barman_log_file: '/backup/server1/log/barman.log' 
	barman_retention_policy : 'RECOVERY WINDOW OF 6 WEEKS' 
	yum_repository_list:
	- EPEL

locations:
- Name: main

instance_defaults:
	platform: bare
	vars:
		ansible_user: epas

instances:
- Name: server1
	backup: server1
	private_ip: [host_ip]
	location: main
	node: 1
	role:
	- primary
	- barman

Logs

2025-06-18 11:32:01,607 [294924] barman.utils INFO: Cleaning up lockfiles directory.
2025-06-18 11:32:01,757 [294926] barman.config WARNING: Invalid configuration option "log_file" in [server1] section.

Reproduction steps

1. Run configure
2. edit config.yml to include barman, and barman parameters including `barman_log_file`
4. run provision
5. run deploy
6. Barman outputs logs to default log location, and on any command executed a warning is displayed:
`WARNING: Invalid configuration option "log_file" in [server1] section.`

Expected result

Upon deployment the barman_log_file key/value should override the default_barman_log_file key/value that is put in the log_file key inside the /etc/barman.conf configuration file. The barmand.d config files do not support the log_file key

Actual result

barman_log_file is inserted into the /etc/barman.d/server1.conf file using the log_file key. This results in the default log directory being used, and a warning message on command execution.

Comment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions