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

Plugin restore doesn`t work due to "no restore jobs hook capability" (plugin version v0.6.0, sidecar image version v.0.5.0), cnpg 1.27

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

説明

I am testing restore from an S3 bucket with the plugin, using the documented restore procedure, from a a working backup archive, cluster and objectstore spec available in [this issue](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/502) if needed.

manifest:

```
# Source: obfuscated-db/templates/restoreTest.yaml
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: obfuscated-db-stage-restore-test
spec:
instances: 1
imagePullPolicy: IfNotPresent
bootstrap:
recovery:
source: source
externalClusters:
- name: source
plugin:
name: barman-cloud.cloudnative-pg.io
parameters:
serverName: obfuscated-db-stage
ObjectName: obfuscated-db-stage-backup
storage:
size: 5Gi
```

# k logs obfuscated-db-stage-restore-test-1-full-recovery-8vg2f

```
Defaulted container "full-recovery" out of: full-recovery, bootstrap-controller (init)
{"level":"info","ts":"2025-09-01T10:20:37.974081413Z","msg":"Starting webserver","logging_pod":"obfuscated-db-stage-restore-test-1-full-recovery","address":"localhost:8010","hasTLS":false}
{"level":"info","ts":"2025-09-01T10:20:38.075642701Z","msg":"Restore through plugin detected, proceeding...","logging_pod":"obfuscated-db-stage-restore-test-1-full-recovery"}
{"level":"error","ts":"2025-09-01T10:20:38.075788667Z","msg":"Error while restoring a backup","logging_pod":"obfuscated-db-stage-restore-test-1-full-recovery","error":"no plugin supports the restore job hooks capability","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\tpkg/mod/github.com/cloudnative-pg/machinery@v0.3.1/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/instance/restore.restoreSubCommand\n\tinternal/cmd/manager/instance/restore/restore.go:79\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/instance/restore.(*restoreRunnable).Start\n\tinternal/cmd/manager/instance/restore/restore.go:62\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/manager/runnable_group.go:226"}
{"level":"info","ts":"2025-09-01T10:20:38.075936142Z","msg":"Stopping and waiting for non leader election runnables"}
{"level":"info","ts":"2025-09-01T10:20:38.075954237Z","msg":"Stopping and waiting for leader election runnables"}
{"level":"info","ts":"2025-09-01T10:20:38.076017473Z","msg":"Webserver exited","logging_pod":"obfuscated-db-stage-restore-test-1-full-recovery","address":"localhost:8010"}
{"level":"info","ts":"2025-09-01T10:20:38.076036788Z","msg":"Stopping and waiting for caches"}
{"level":"info","ts":"2025-09-01T10:20:38.076095902Z","msg":"Stopping and waiting for webhooks"}
{"level":"info","ts":"2025-09-01T10:20:38.076149305Z","msg":"Stopping and waiting for HTTP servers"}
{"level":"info","ts":"2025-09-01T10:20:38.076158969Z","msg":"Wait completed, proceeding to shutdown the manager"}
{"level":"error","ts":"2025-09-01T10:20:38.076182609Z","msg":"restore error","logging_pod":"obfuscated-db-stage-restore-test-1-full-recovery","error":"while restoring cluster: no plugin supports the restore job hooks capability","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\tpkg/mod/github.com/cloudnative-pg/machinery@v0.3.1/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/instance/restore.NewCmd.func1\n\tinternal/cmd/manager/instance/restore/cmd.go:101\ngithub.com/spf13/cobra.(*Command).execute\n\tpkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1015\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tpkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148\ngithub.com/spf13/cobra.(*Command).Execute\n\tpkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071\nmain.main\n\tcmd/manager/main.go:71\nruntime.main\n\t/opt/hostedtoolcache/go/1.24.6/x64/src/runtime/proc.go:283"}
```

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

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

調査の方向性

失敗は internal/cmd/manager/instance/restore/restore.go:79 と cmd.go:101 に到達します。まず plugin v0.6.0 と sidecar v0.5.0、restore manifest、ログを比較し、動作するセットアップには issue #502 を使用します。文書化された restore 手順が「no plugin supports the restore job hooks capability」エラーなしで完了すれば完了です。

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

評価

技術スタック
go, kubernetes, postgresql
領域
databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

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

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