mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-04-30 04:17:11 +00:00
Ignore not found error during patching managedFields
Ignore not found error during patching managedFields Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
@@ -62,6 +62,7 @@ To fix CVEs and keep pace with Golang, Velero made changes as follows:
|
||||
|
||||
|
||||
### All Changes
|
||||
* Ignore not found error during patching managedFields (#6110, @ywk253100)
|
||||
* Modify new scope resource filters name. (#6089, @blackpiglet)
|
||||
* Make Velero not exits when EnableCSI is on and CSI snapshot not installed (#6062, @blackpiglet)
|
||||
* Restore Services before Clusters (#6057, @ywk253100)
|
||||
|
||||
@@ -1514,10 +1514,13 @@ func (ctx *restoreContext) restoreItem(obj *unstructured.Unstructured, groupReso
|
||||
if patchBytes != nil {
|
||||
if _, err = resourceClient.Patch(name, patchBytes); err != nil {
|
||||
ctx.log.Errorf("error patch for managed fields %s: %v", kube.NamespaceAndName(obj), err)
|
||||
errs.Add(namespace, err)
|
||||
return warnings, errs, itemExists
|
||||
if !apierrors.IsNotFound(err) {
|
||||
errs.Add(namespace, err)
|
||||
return warnings, errs, itemExists
|
||||
}
|
||||
} else {
|
||||
ctx.log.Infof("the managed fields for %s is patched", kube.NamespaceAndName(obj))
|
||||
}
|
||||
ctx.log.Infof("the managed fields for %s is patched", kube.NamespaceAndName(obj))
|
||||
}
|
||||
|
||||
if groupResource == kuberesource.Pods {
|
||||
|
||||
Reference in New Issue
Block a user