timescale / helm-charts

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

Chart `timescaledb-single:` `pgbackrest --stanza=poddb stanza-create` blocked due to non existent `repo1-path` directory (in the container) when `repo1-path`'s name is auto generated #545

Open davidandreoletti opened 1 year ago

davidandreoletti commented 1 year ago

What happened?

1. Context

With pgbackrest enabled, repo1-path (the path to store pgbackrest backups) is automatically set from configmap-pgbackrest.yaml via:

{{- $globalDefaults := dict "spool-path" "/var/run/postgresql" "compress-level" "3" "repo1-path" (printf "/%s/%s/" .Release.Namespace (include "clusterName" .)) }}

2. Runtime

Once the pgbackrest container starts, it executes pgbackrest_bootstrap.sh and eventually run the pgbackrest --stanza=poddb stanza-create.

However, pgbackrest --stanza=poddb stanza-create stays stuck (at least in our deployment).

pgbackrest's user guide doc did manually create the repo1-path. Hence, it seems reasonable for this chart to create it too.

3. Workaround

With the curent statefulset-timescaledb.yaml and auto generated repo1-path name, it seems there is no way (yet) to create the repo1-path directory some other way:

However, one can configure repo1-path to /scripts/poddb and create /scripts/poddb manually in the pgbackrest container. Then stanza creation succeeds and backups too.

Did you expect to see something different?

repo1-path directory is created automatically by the pgbackrest_bootstrap.sh script when non existent.

How to reproduce it (as minimally and precisely as possible):

Explained above.

Environment

Anything else we need to know?: N/A

w3irdrobot commented 1 year ago

this still is an issue using image timescale/timescaledb-ha:pg14.6-ts2.9.1-p1 with Helm chart timescaledb-single-0.33.1