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

Abierto
#507 2 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Go
Estrellas
191
Forks
72
Merge medio
2 d 21 h
PR fusionados (30 d)
21

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

El fallo llega a internal/cmd/manager/instance/restore/restore.go:79 y cmd.go:101; empieza comparando plugin v0.6.0 con sidecar v0.5.0 y el manifiesto de restore y los logs, usando issue #502 para la configuración de trabajo. Se considera terminado cuando el procedimiento de restore documentado se completa sin el error “no plugin supports the restore job hooks capability”.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
go, kubernetes, postgresql
Área
databases
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.