vmware-tanzu / velero

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

Random race condition in the restore with managed fields #8132

Open mpryc opened 3 weeks ago

mpryc commented 3 weeks ago

What steps did you take and what happened: There is a race condition in the restore operation causing random errors visible in the logs during restore operation. Below is stripped down log presenting the error during restore:

time="2024-08-15T12:21:15Z" level=error msg="error patch for managed fields test-velero: Operation cannot be fulfilled on namespaces \"test-velero\": the object has been modified; please apply your changes to the latest version and try again" logSource="/remote-source/velero/app/pkg/restore/restore.go:1682" restore=openshift-adp-2/mysql-test-velero-11abd1b8-3a6e-a161-1b3c-435a2812c5a0

[...]

time="2024-08-15T12:22:43Z" level=error msg="Cluster resource restore error: Operation cannot be fulfilled on namespaces \"test-velero\": the object has been modified; please apply your changes to the latest version and try again" logSource="/remote-source/velero/app/pkg/controller/restore_controller.go:587" restore=openshift-adp-2/mysql-test-velero-11abd1b8-3a6e-a161-1b3c-435a2812c5a0

What did you expect to happen: Managed fields properly restored without error message in the logs.

blackpiglet commented 2 weeks ago
error patch for managed fields test-velero

Could you check what the resource is represented by the name test-velero?