timescale / helm-charts

Configuration and Documentation to run TimescaleDB in your Kubernetes cluster
Apache License 2.0
263 stars 223 forks source link

[ISSUE] Unrecognized configuration parameter after chart upgrade #333

Open erikh3 opened 2 years ago

erikh3 commented 2 years ago

Upgrade from v0.8.2 -> v0.9.0 fails due to new major version of Postgresql does not recognize wal_keep_segments parameter in /var/lib/postgresql/data/postgresql.conf.

To Reproduce Deploy chart version v0.8.2 and upgrade to v0.9.0.

Expected behavior Postgresql major version should update from 12 to 13 and wal_keep_segments should be replaced with wal_keep_size.

Deployment

values.yaml:

secretNames:
  credentials: "timescaledb-creds"
  certificate: "timescaledb-cert"
backup.enabled: false
patroni.log.level: INFO
postInit:
  - configMap:
      name: db-init-script
      optional: false
service.primary:
    type: ClusterIP
    port: 5432
loadBalancer.enabled: false
persistentVolumes.data.size: 8Gi
prometheus.enabled: true
affinity:
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
    - topologyKey: "failure-domain.beta.kubernetes.io/zone"
      labelSelector:
        matchLabels:
          app: "timescale-timescaledb"
          release: "timescale"
          cluster-name: "timescale"

Kubernetes environment: EKS

Deployment

helm list:

NAME        NAMESPACE   REVISION    UPDATED                                 STATUS  CHART                       APP VERSION
timescale   visioncraft 12          2022-01-27 18:31:34.146896014 +0100 CET failed  timescaledb-single-0.9.0

Logs

Logs from last pod from stateful set:

2022-01-27 17:51:35.848 GMT [1359] LOG: unrecognized configuration parameter "wal_keep_segments" in file "/var/lib/postgresql/data/postgresql.conf" line 42
2022-01-27 17:51:35.848 GMT [1359] FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
2022-01-27 17:51:35,860 INFO: postmaster pid=1359
/var/run/postgresql:5432 - no response
2022-01-27 17:51:35,870 INFO: Lock owner: timescale-timescaledb-1; I am timescale-timescaledb-2
2022-01-27 17:51:35,871 INFO: failed to start postgres

Which causes: Readiness probe failed: /var/run/postgresql:5432 - no response

Additional context

Running on EKS with 3 timescale pods. Only the last one fails with an error. As a workaround version: 12 can be set so that Postgresql 12 will be used instead.

I tried to edit /var/lib/postgresql/postgresql.conf manually, but when pod is recreated this file reverts back to the previous state with an unrecognized option.

For now, we upgraded to v0.10.0 with version: 12 (Postgresql major version 12).

tomi936 commented 2 years ago

Same issue here!

I used v0.11.0 version of the timescale/timescaledb-single chart from helm repository. But the version settings did not worked for me. I had to overwrite the image version: values.yaml :

image:
  repository: timescaledev/timescaledb-ha
  tag: pg12-ts2.0-latest

I was upgrading from v.0.8.2 to v0.10.0 thenv0.11.0