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

Đang mở
#507 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Go
Star
191
Fork
72
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
18

Mô tả

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"}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Lỗi đi tới internal/cmd/manager/instance/restore/restore.go:79 và cmd.go:101; hãy bắt đầu bằng cách so sánh plugin v0.6.0 với sidecar v0.5.0 cùng manifest restore và các log, sử dụng issue #502 cho thiết lập đang hoạt động. Hoàn thành có nghĩa là quy trình restore được ghi lại hoàn tất mà không có lỗi “no plugin supports the restore job hooks capability”.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go, kubernetes, postgresql
Lĩnh vực
databases
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.