Skip to content

Unable to enforce retention policiesΒ #149

@theo-bot

Description

@theo-bot

Hi,

In our lab we're testing the barman cloud plugin. However we ran into this issue:
{"level":"info","ts":"2025-08-19T10:43:14.849505751Z","msg":"Applying backup retention policy","logging_pod":"mydb16-1","retentionPolicy":"5d"}
{"level":"error","ts":"2025-08-19T10:43:17.242543502Z","logger":"barman","msg":"Error invoking barman-cloud-backup-delete","logging_pod":"mydb16-1","options":["--endpoint-url","https://minio.mydb-lab.test4.example.com","--cloud-provider","aws-s3","--retention-policy","RECOVERY WINDOW OF 5 DAYS","s3://mydb16","mydb16"],"stdout":"","stderr":"2025-08-19 10:43:17,136 [28532] ERROR: Could not delete backup 20250806T063015: An error occurred (MissingContentMD5) when calling the DeleteObjects operation: Missing required header for this request: Content-Md5.\n","error":"exit status 1","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/barman-cloud/pkg/command.DeleteBackupsByPolicy\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/command/backupdelete.go:71\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/instance.(*CatalogMaintenanceRunnable).maintenance\n\t/workspace/internal/cnpgi/instance/retention.go:131\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/instance.(*CatalogMaintenanceRunnable).cycle\n\t/workspace/internal/cnpgi/instance/retention.go:80\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/instance.(*CatalogMaintenanceRunnable).Start\n\t/workspace/internal/cnpgi/instance/retention.go:48\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"error","ts":"2025-08-19T10:43:17.242640998Z","msg":"while enforcing retention policies","logging_pod":"mydb16-1","error":"exit status 1","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/instance.(*CatalogMaintenanceRunnable).maintenance\n\t/workspace/internal/cnpgi/instance/retention.go:138\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/instance.(*CatalogMaintenanceRunnable).cycle\n\t/workspace/internal/cnpgi/instance/retention.go:80\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/instance.(*CatalogMaintenanceRunnable).Start\n\t/workspace/internal/cnpgi/instance/retention.go:48\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"error","ts":"2025-08-19T10:43:17.242743185Z","msg":"Retention policy enforcement failed","logging_pod":"mydb16-1","error":"exit status 1","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/instance.(*CatalogMaintenanceRunnable).Start\n\t/workspace/internal/cnpgi/instance/retention.go:50\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}

Any suggestion would be welcome

/Theo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions