[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 小时
- 30 天内合并 PR
- 19
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 于 3 天前认领。 未关闭
难度 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 个 reaction ·
维护者通常 1 天内回复
-
data.compression rejects zstd although barman-cloud-backup supports it可能已有人在做 @dgsardina 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
cloudnative-pg/plugin-barman-cloud#1104 · 4 个 reaction ·
维护者通常 1 天内回复
-
Add RBAC aggregation labels to ObjectStore editor/viewer ClusterRoles可能已有人在做 @stefanpeknik 于 24 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
cloudnative-pg/plugin-barman-cloud#1102 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 18/100
cloudnative-pg/plugin-barman-cloud#1151 ·
维护者通常 1 天内回复
查看 cloudnative-pg/plugin-barman-cloud 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
LanternOps/breeze#8353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
prime-radiant-inc/evener#4223 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
input.Scanner.Scan loops forever when the input reaches EOF, hanging every ConfirmAction prompt可能已有人在做 @mlliarm 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
elastic/cloud-sdk-go#521 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
open-telemetry/opentelemetry-go-compile-instrumentation#1467 ·
维护者通常 3 天内回复