vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.57k stars 1.39k forks source link

maintenance job fails always for a single schedule with: "maintenance must be run by designated user" #8110

Closed mosesdd closed 1 month ago

mosesdd commented 1 month ago

What steps did you take and what happened:

Created a schedule to backup a namespace months ago, since these maintenance jobs exist they're always failing for this single schedule.

2024-08-13T06:08:56.162189300Z time="2024-08-13T06:08:56Z" level=info msg="Succeeded to open repo for maintenance" logSource="pkg/repository/udmrepo/kopialib/lib_repo.go:172" 2024-08-13T06:08:56.920458025Z time="2024-08-13T06:08:56Z" level=error msg="An error occurred when running repo prune" error="failed to prune repo: error to prune backup repo: error to maintain repo: error to run maintenance under mode auto: maintenance must be run by designated user: " error.file="/go/src/github.com/vmware-tanzu/velero/pkg/repository/udmrepo/kopialib/lib_repo.go:219" error.function="github.com/vmware-tanzu/velero/pkg/repository/udmrepo/kopialib.(*kopiaMaintenance).runMaintenance" logSource="pkg/cmd/cli/repomantenance/maintenance.go:72"

What did you expect to happen: Maintenance jobs succeeds as for the other schedules

Environment:

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

mosesdd commented 1 month ago

Fixed it myself, somehow there was no maintenance owner set so I did manually:

kopia maintenance set --owner=default@default

After to connecting with

kopia repository connect s3 --bucket=velero --access-key=ACCESS_KEY --secret-access-key=SECRET_ACCESS_KEY --endpoint=mini:9000 --prefix=kopia/$NAMESPACE/