I stumbled over the problem when I tried to implement the following article via VyOS:
https://medium.com/@eremeykin/how-to-setup-single-primary-postgresql-replication-with-docker-compose-98c48f233bbf
My container has the folllowing commited config:
set container name test-postgres-master allow-host-networks set container name test-postgres-master command 'postgres -c wal_level=replica -c hot_standby=on -c max_wal_senders=10 -c max_replication_slots=10 -c hot_standby_feedback=on' set container name test-postgres-master environment POSTGRES_PASSWORD value 'password' set container name test-postgres-master image 'postgres:14-alpine' set container name test-postgres-master restart 'always'
so far commit works.
When I now add the following the commit fails:
set container name test-postgres-master environment POSTGRES_HOST_AUTH_METHOD value 'scram-sha-256\nhost replication all 0.0.0.0/0 md5'
Error shown:
VyOS had an issue completing a command. We are sorry that you encountered a problem while using VyOS. There are a few things you can do to help us (and yourself): - Contact us using the online help desk if you have a subscription: https://support.vyos.io/ - Make sure you are running the latest version of VyOS available at: https://vyos.net/get/ - Consult the community forum to see how to handle this issue: https://forum.vyos.io - Join us on Slack where our users exchange help and advice: https://vyos.slack.com When reporting problems, please include as much information as possible: - do not obfuscate any data (feel free to contact us privately if your business policy requires it) - and include all the information presented below Report time: 2024-01-25 17:09:25 Image version: VyOS 1.4.0-rc1 Release train: sagitta Built by: Sentrium S.L. Built on: Thu 21 Dec 2023 19:06 UTC Build UUID: 2463607a-ddc5-4942-8685-00d078350c68 Build commit ID: 81ec3de04eb291 Architecture: x86_64 Boot via: installed image System type: VMware guest Hardware vendor: VMware, Inc. Hardware model: VMware Virtual Platform Hardware S/N: VMware-42 04 c0 c4 d5 1c 19 5c-b5 97 2e 61 76 37 b8 1d Hardware UUID: c4c00442-1cd5-5c19-b597-2e617637b81d Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/container.py", line 487, in <module> apply(c) File "/usr/libexec/vyos/conf_mode/container.py", line 460, in apply cmd(f'systemctl restart vyos-container-{name}.service') File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 155, in cmd raise OSError(code, feedback) PermissionError: [Errno 1] failed to run command: systemctl restart vyos-container-test-postgres-master.service returned: exit code: 1 noteworthy: cmd 'systemctl restart vyos-container-test-postgres-master.service' returned (out): returned (err): Failed to restart vyos-container-test-postgres-master.service: Unit vyos-container-test-postgres-master.service has a bad unit file setting. See system logs and 'systemctl status vyos-container-test-postgres-master.service' for details. [[container]] failed Commit failed
When I remove the \n it works. However my example requires it.
How could this be solved?
Regards
Markus