Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

pgbackrest conf does not reflect values in pgbackrestSecretName timescaledb-single #598

Open
theelderbeever opened this issue Mar 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@theelderbeever
Copy link

theelderbeever commented Mar 27, 2023

What happened?
I populated a secret manually in our namespace to manage the pgbackrest settings and the S3 region was not reflected in the pgbackrest.conf file on the server resulting in the database not being able to find the bucket.

ERROR: [103]: unable to find a valid repository:
repo1: [HostConnectError] unable to load info file '/billing-platform/billing-platform-timescaledb/archive/poddb/archive.info' or '/billing-platform/billing-platform-timescaledb/archive/poddb/archive.info.copy':
HostConnectError: unable to get address for 's3://qn-billing-platform-timescaledb-backups.s3.amazonaws.com': [-2] Name or service not known
HostConnectError: unable to get address for 's3://qn-billing-platform-timescaledb-backups.s3.amazonaws.com': [-2] Name or service not known
HINT: archive.info cannot be opened but is required to push/get WAL segments.
HINT: is archive_command configured correctly in postgresql.conf?
HINT: has a stanza-create been performed?
HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme.
2023-03-27 22:09:26 UTC [47]: [6421b645.2f-113] @,app= [00000] LOG: archive command failed with exit code 103
2023-03-27 22:09:26 UTC [47]: [6421b645.2f-114] @,app= [00000] DETAIL: The failed archive command was: /etc/timescaledb/scripts/pgbackrest_archive.sh pg_wal/000000010000000000000001
Sourcing /home/postgres/.pgbackrest_environment
WARN: environment contains invalid option 'backup-enabled'

Did you expect to see something different?
I expected that when configuring a secret with the following values, specifically PGBACKREST_REPO1_S3_REGION, that the pgbackrest.conf would used them. It correctly uses the bucket strangely.

PGBACKREST_REPO1_S3_REGION
PGBACKREST_REPO1_S3_KEY
PGBACKREST_REPO1_S3_KEY_SECRET
PGBACKREST_REPO1_S3_BUCKET
PGBACKREST_REPO1_S3_ENDPOINT

How to reproduce it (as minimally and precisely as possible):
Configure a secret manually using the following keys and set the pgbackrestSecretName to your created secret.

PGBACKREST_REPO1_S3_REGION: us-east-1
PGBACKREST_REPO1_S3_KEY: your-key
PGBACKREST_REPO1_S3_KEY_SECRET: your-secret
PGBACKREST_REPO1_S3_BUCKET: your-bucket
PGBACKREST_REPO1_S3_ENDPOINT: s3.amazonaws.com

Environment

  • Which helm chart and what version are you using?
    0.30.0

  • What is in your values.yaml ?

timescaledb-single:
  replicaCount: 2
  secrets:
    credentialsSecretName: "billing-platform-timescaledb-patroni"
    pgbackrestSecretName: "billing-platform-timescaledb-pgbackrest"

  backup:
    enabled: true
    
  service:
    primary:
      type: LoadBalancer
      port: 5432

    replica:
      type: LoadBalancer
      port: 5432

  persistentVolumes:
    data:
      enabled: true
      size: 250Gi
      storageClass: gp3-iops3k
    wal:
      enabled: true
      size: 25Gi
      storageClass: gp3-iops3k
  resources:
    limits:
      cpu: 2000m
      memory: 8192Mi
    requests:
      cpu: 2000m
      memory: 8192Mi

  sharedMemory:
    useMount: true

  pgBouncer:
    enabled: true
    port: 6432
    config:
      max_client_conn: 5000
      default_pool_size: 25

  prometheus:
    enabled: true
  • Kubernetes version information:

    kubectl version

Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-15T13:33:11Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"24+", GitVersion:"v1.24.10-eks-48e63af", GitCommit:"9176fb99b52f8d5ff73d67fea27f3a638f679f8a", GitTreeState:"clean", BuildDate:"2023-01-24T19:17:48Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes cluster kind:

AWS EKS via terraform code.

Anything else we need to know?:

@theelderbeever theelderbeever added the bug Something isn't working label Mar 27, 2023
@theelderbeever
Copy link
Author

This is still an issue as of Version 0.33.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant