WAL-G S3 Endpoint Ignored when using `s3://<endpoint>/<bucket>/<prefix>` in `WALG_S3_PREFIX`

Aperta
#2,992 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
aws, kubernetes, postgresql

Direzione di ricerca

Inizia dalla configurazione di WAL-G backup-push e da come l’operatore passa WALG_S3_ENDPOINT, WALG_S3_PREFIX e WALG_S3_FORCE_PATH_STYLE al container Spilo. Riproduci la richiesta verso l’endpoint Scaleway e confrontala con l’URL specifica di AWS che non funziona. Il lavoro è completato quando backup-push utilizza l’endpoint personalizzato configurato e un URL in stile path.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

📝 Description

The WAL-G component within the Spilo container is ignoring the explicitly configured S3 endpoint (WALG_S3_ENDPOINT) and the full URL provided in WALG_S3_PREFIX when attempting a backup push to an S3-compatible provider (Scaleway S3).

Instead of using the configured endpoint for HTTP requests, WAL-G attempts to resolve an AWS-specific domain name, leading to a DNS failure and the inability to upload backups.

The full URL configuration was applied to WALG_S3_PREFIX as a workaround to force the endpoint resolution, but it was unsuccessful.

⚙️ Environment Details
  • Spilo Image: ghcr.io/zalando/spilo-17:4.0-p3
  • Postgres Version: 17
  • S3 Provider: Scaleway S3 (s3.pl-waw.scw.cloud)
  • WAL-G Command failing: wal-g backup-push /home/postgres/pgdata/pgroot/data
📄 PostgreSQL CRD (postgres-s3.yaml)
kind: postgresql
apiVersion: acid.zalan.do/v1
metadata:
  name: xme
  namespace: postgres
spec:
# ... (Configuration truncated for brevity)
  env:
    - name: USE_WALG_BACKUP
      value: "true"
    - name: WALG_STORAGE
      value: "s3"
    - name: WALG_S3_FORCE_PATH_STYLE
      value: "true"
    - name: WALG_S3_PREFIX
      value: "s3://s3.pl-waw.scw.cloud/postgrestest/spilo" # Full URL attempt
    - name: WALG_S3_ENDPOINT
      value: "https://s3.pl-waw.scw.cloud"
    - name: LOGICAL_BACKUP_S3_ENDPOINT
      value: "https://s3.pl-waw.scw.cloud"
# ... (Logical backup envs configured correctly)
    - name: AWS_S3_FORCE_PATH_STYLE
      value: "true"
    - name: AWS_ACCESS_KEY_ID
      valueFrom:
        secretKeyRef:
          name: aws-token
          key: AWS_ACCESS_KEY_ID # ***
    - name: AWS_SECRET_ACCESS_KEY
      valueFrom:
        secretKeyRef:
          name: aws-token
          key: AWS_SECRET_ACCESS_KEY # ***
    - name: AWS_DEFAULT_REGION
      valueFrom:
        secretKeyRef:
          name: aws-token
          key: AWS_DEFAULT_REGION # ***
    - name: AWS_REGION
      value: "pl-waw"
# ... (Rest of CRD truncated)
📄 Operator ConfigMap (postgres-operator ConfigMap)
# ... (ConfigMap truncated for brevity)
data:
  aws_region: eu-central-1
  docker_image: ghcr.io/zalando/spilo-17:4.0-p3
  logical_backup_provider: "s3"
  logical_backup_s3_access_key_id: "********************"
  logical_backup_s3_bucket: "postgrestest"
  logical_backup_s3_bucket_prefix: "spilo"
  logical_backup_s3_region: "pl-waw"
  logical_backup_s3_endpoint: "https://s3.pl-waw.scw.cloud"
  logical_backup_s3_force_path_style: "true"
  logical_backup_s3_secret_access_key: "************************************"
# ... (Rest of ConfigMap truncated)
❌ Error Log
ERROR: 2025/11/18 13:46:45.868649 failed to upload 'spilo/basebackups_005/base_000000010000000000000002/tar_partitions/part_001.tar.lz4' to bucket 'postgrestest': RequestError: send request failed
caused by: Put "https://s3.pl-waw.amazonaws.com/postgrestest/spilo/basebackups_005/base_000000010000000000000002/tar_partitions/part_001.tar.lz4": dial tcp: lookup s3.pl-waw.amazonaws.com on 10.96.0.10:53: no such host
ERROR: 2025/11/18 13:46:45.868896 upload: could not upload 'base_000000010000000000000002/tar_partitions/part_001.tar.lz4'
🎯 Expected Behavior

WAL-G should respect the WALG_S3_ENDPOINT (https://s3.pl-waw.scw.cloud) and WALG_S3_FORCE_PATH_STYLE (true) to form a request URL using the Path Style on the custom endpoint:

https://s3.pl-waw.scw.cloud/postgrestest/spilo/.../part_001.tar.lz4

❓ Question

Is there a known configuration parameter that needs to be set to completely disable the AWS SDK's automatic endpoint construction based on region and bucket name when a custom endpoint is provided?

Lingua principale
Go
Stelle
5.3k
Fork
1.1k
Merge medio
3g 17h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di zalando/postgres-operator

Tutte le issue di zalando/postgres-operator

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.