[Feature Request] barman-cloud plugin should support virtual-hosted style addressing for S3-compatible storage
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
調査の方向性
まず、issueで説明されている barman-cloud ObjectStore の設定と boto3 クライアントの構築箇所を特定します。endpointURL がクライアントに渡される方法を追跡し、設定可能なアドレッシングスタイルが、S3互換ストレージ向けの virtual-hosted リクエストと path-style リクエストの両方をサポートしていることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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:
- Attempted Solutions:
[ ] I have tried setting the environment variable AWS_S3_ADDRESSING_STYLE=virtual in the pod configuration, but it has no effect
-
Tested various endpointURL formats including:
-
https://bucket-name.oss-cn-region.aliyuncs.com (virtual-hosted style)
-
https://oss-cn-region.aliyuncs.com (path-style)
-
-
The plugin consistently uses path-style addressing regardless of the endpoint URL format
- 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
- 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
- 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
- 主要言語
- Go
- スター
- 198
- フォーク
- 81
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudnative-pg/plugin-barman-cloud のほかの issue
-
Wrong `ObjectStore` key logged when the backup object store can't be retrieved in the instance sidecar対応中かも @SamarthSRao が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudnative-pg/plugin-barman-cloud#1142 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudnative-pg/plugin-barman-cloud#1117 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
data.compression rejects zstd although barman-cloud-backup supports it対応中かも @dgsardina が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
cloudnative-pg/plugin-barman-cloud#1104 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Add RBAC aggregation labels to ObjectStore editor/viewer ClusterRoles対応中かも @stefanpeknik が 25 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
cloudnative-pg/plugin-barman-cloud#1102 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
cloudnative-pg/plugin-barman-cloud#1151 ·
メンテナーはふだん 1 日以内に返信
cloudnative-pg/plugin-barman-cloud の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
signal18/replication-manager#1981 ·
メンテナーはふだん 1 日以内に返信
-
Battery UI: German word "Speicher"対応中かも @github-actions が今日担当しました。 オープンux
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
evcc-io/evcc#34716 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
jasonfen/terminal-space-program#611 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
prime-radiant-inc/evener#4329 ·
メンテナーはふだん 1 日以内に返信