cloudnative-pg / cloudnative-pg/plugin-barman-cloud

Cannot backup to SeaweedFS objectstore

オープン
#679 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Go
スター
191
フォーク
72
平均マージ
2日 21時間
マージ済み PR(30日)
21

説明

When creating ObjectStore CR that points to SeaweedFS s3 objectstore it starts uploading the wal archives, makes a .upload directory, but then I got the error:
`
{"level":"error","ts":"2025-12-16T10:46:23.075022375Z","msg":"Error while handling GRPC request","logging_pod":"postgresql-1","info":{"Server":{"Client":{"Client":{}},"InstanceName":"postgresql-1","SpoolDirectory":"/controller/wal-restore-spool","PGDataPath":"/var/lib/postgresql/data/pgdata","PGWALPath":"/var/lib/postgresql/data/pgdata/pg_wal"},"FullMethod":"/cnpgi.wal.v1.WAL/Archive"},"error":"unexpected failure invoking barman-cloud-wal-archive: exit status 4","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/machinery@v0.3.1/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http.(*Server).Start.logFailedRequestsUnaryServerInterceptor.func2\n\t/go/pkg/mod/github.com/cloudnative-pg/cnpg-i-machinery@v0.4.1/pkg/pluginhelper/http/grpc.go:53\ngoogle.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1\n\t/go/pkg/mod/google.golang.org/grpc@v1.76.0/server.go:1234\ngithub.com/cloudnative-pg/cnpg-i/pkg/wal._WAL_Archive_Handler\n\t/go/pkg/mod/github.com/cloudnative-pg/cnpg-i@v0.3.0/pkg/wal/wal_grpc.pb.go:196\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/grpc@v1.76.0/server.go:1431\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/grpc@v1.76.0/server.go:1842\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/go/pkg/mod/google.golang.org/grpc@v1.76.0/server.go:1061"}
`

However, with awscli I can reach the bucket and can upload objects

Objectstore definition
`
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: azure-backup-store
namespace: postgres
spec:
# Base configuration for Barman Cloud to connect to Azure
configuration:
destinationPath: "s3://backups"
endpointURL: "http://seaweedfs-s3.seaweedfs.svc.cluster.local:8333"
s3Credentials:
accessKeyId:
name: aws-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: aws-creds
key: ACCESS_SECRET_KEY
wal:
compression: gzip
data:
jobs: 2
`

Cluster definition:
`
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgresql
namespace: postgres
spec:
instances: 1
storage:
size: 2Gi

plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: azure-backup-store
serverName: postgresql

bootstrap:
initdb:
database: authentik
owner: authentik
secret:
name: authentik-secret

enableSuperuserAccess: true
superuserSecret:
name: pgsuperuser
`

I also tried other options, and all of them worked except for the Barman Cloud Plugin, which drops an error.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず SeaweedFS に対して ObjectStore と Cluster の設定を再現し、その後、WAL Archive request で報告された barman-cloud-wal-archive の失敗を調査します。WAL アーカイブが exit status 4 エラーなしに設定された宛先へ正常にアップロードされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go, postgresql
領域
backend, databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。