Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Feature Request] barman-cloud plugin should support virtual-hosted style addressing for S3-compatible storage

Aperta
#712 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
aws, go, postgresql, python
Ambito
cloud, database

Direzione di ricerca

Inizia individuando la configurazione barman-cloud ObjectStore e la costruzione del client boto3 descritte nell'issue. Segui il modo in cui endpointURL viene passato al client, quindi verifica che uno stile di indirizzamento configurabile supporti sia le richieste virtual-hosted sia quelle path-style per lo storage compatibile con S3.

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

Descrizione

enhancement
Description:

I'm using CloudNativePG with the barman-cloud plugin (version 0.9.0) for PostgreSQL backups to Alibaba Cloud OSS. However, I've encountered a critical issue: the plugin only supports path-style addressing, while Alibaba Cloud OSS (and many other S3-compatible services) now require virtual-hosted style addressing.

Problem Details:

AWS has deprecated path-style addressing since September 30, 2023
Many cloud providers (Alibaba Cloud OSS, Google Cloud Storage, etc.) require or strongly recommend virtual-hosted style
The barman-cloud plugin doesn't provide any configuration parameter for addressing_style
When endpointURL is specified, it defaults to path-style addressing

Current Workaround:

Currently, users have to:

Use custom backup solutions instead of the official plugin
Or use unsupported path-style endpoints (if available)

Expected Behavior:

The barman-cloud plugin should support both addressing styles with a configuration parameter like:

configuration:
  destinationPath: "s3://bucket-name/"
  endpointURL: "https://bucket-name.oss-cn-region.aliyuncs.com"
  s3AddressingStyle: "virtual"  # or "path"

Or automatically detect the appropriate style based on the endpoint URL format.

Technical Background:
  • AWS SDK (boto3) already supports addressing_style parameter in boto3.session.Config

  • Virtual-hosted style is now the standard for S3-compatible services

  • Path-style addressing has been deprecated by AWS

Impact:

This limitation prevents users from using the official plugin with:

  • Alibaba Cloud OSS

  • Google Cloud Storage

  • DigitalOcean Spaces

  • And other S3-compatible services that enforce virtual-hosted style

Proposed Solution:

Add a new parameter s3AddressingStyle to the ObjectStore configuration that gets passed to the underlying boto3 client configuration.

Code Reference:

In barman-cloud implementation, it should configure boto3 like:

config = boto3.session.Config(
    s3={'addressing_style': addressing_style}
)
s3_client = boto3.client(
    's3',
    endpoint_url=endpoint,
    config=config
)
Environment:
  • CloudNativePG: 1.28.0

  • barman-cloud plugin: 0.9.0

  • Kubernetes: 1.32.7

  • Storage: Alibaba Cloud OSS

Additional Context:
  1. Attempted Solutions:

[ ] I have tried setting the environment variable AWS_S3_ADDRESSING_STYLE=virtual in the pod configuration, but it has no effect

  1. Current Status:
  • Alibaba Cloud OSS strictly enforces virtual-hosted style addressing

  • AWS has completely phased out path-style support

  • This issue is becoming critical as more S3-compatible services adopt virtual-hosted style

  1. Reproduction Steps:
  • Configure barman-cloud plugin with Alibaba Cloud OSS endpoint

  • Set endpointURL to virtual-hosted style format

  • Observe that the plugin still attempts path-style requests

  • Receive errors from OSS indicating path-style is not supported

  1. Workaround Limitations:
  • Custom backup scripts lack the integration and reliability of the official plugin

  • Alternative S3-compatible endpoints may not be available in all regions

  • This forces users to choose between functionality and using the official tooling

Lingua principale
Go
Stelle
192
Fork
75
Merge medio
1g 7h
PR unite (30g)
17

Guida per i contributori

Apri la guida per i contributori

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 cloudnative-pg/plugin-barman-cloud

Tutte le issue di cloudnative-pg/plugin-barman-cloud

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.