canonical / postgresql-operator

A Charmed Operator for running PostgreSQL on machines
https://charmhub.io/postgresql
Apache License 2.0
7 stars 17 forks source link

charmed-postgresql.pgbackrest-service[7546]: ERROR: [037]: server command requires option: tls-server-auth #468

Open srunde3 opened 1 month ago

srunde3 commented 1 month ago

Note that this is not meant to be a bug report specific to the integration between Landscape Server and Postgres. It is only meant to bring attention to the error log for pgbackrest.

Steps to reproduce

  1. Deploy the Landscape Server scalable bundle using the modern postgres charm (yaml file attached):

landscape-scalable-postgres-update.txt

  1. juju ssh into the postgres unit
  2. journalctl -u snap.charmed-postgresql.pgbackrest-service.service to see logs like
charmed-postgresql.pgbackrest-service[7546]: ERROR: [037]: server command requires option: tls-server-auth

Expected behavior

No error logs

Actual behavior

See pgbackrest log messages

Versions

Operating system: Ubuntu 24.04 LTS

Juju CLI: 3.1.8-genericlinux-amd64

Juju agent: 14.10

Charm revision: 363

LXD: 5.21.1 LTS

Log output

Juju debug log: log.txt

Additional context

github-actions[bot] commented 1 month ago

https://warthogs.atlassian.net/browse/DPE-4345

taurus-forever commented 1 month ago

A bit long reply, so...

TL;DR: ignore it, we will mute this noisy error message. Charmed PostgreSQL works well and as designed.

2charm developers: keep systemd services disabled IF service is NOT yet configured on charm (COS exporters, pgbackrest, ...). CC: @marceloneppel @dragomirp ! ;-)

Long:

1) postgresql charm requires relation with s3-integrator to configure pgbackrest for backups Once related you will see no such error message.

2) snap installs list of services which are enabled by default:

ubuntu@juju-6788c5-2:~$ snap services charmed-postgresql
Service                                          Startup   Current   Notes
charmed-postgresql.patroni                       disabled  active    -
charmed-postgresql.pgbackrest-service            enabled   inactive  -
charmed-postgresql.prometheus-postgres-exporter  enabled   active    -

As a result systemd is trying to start pgbackrest (backup tool) before backup is fully configured on the charm level => it fails and systemd gives up in 5 retries => the error message you see.

We discussed this several time and got no consensuse as no harm here... but less code... but it confuses users (you). We will this bugreport as a reference to fix this finally. Services should be enabled/start only after the charm dependencies configuration and not on boot by default.

3) We are carefully checking juju debug-log to make sure no ERRORs produced in 14/stable, but didn't pay enough attentions to journalctl logs. We will improve this also.

At the moment you can safely ignore reported pgbackrest error message until backup is fully configured.

Thank you for highlighting this!