fluid
fluid copied to clipboard
[BUG] Got "StorageError: invalid object, Code 4" error when deleting runtimes
What is your environment(Kubernetes version, Fluid version, etc.)
Describe the bug "StorageError: invalid object, Code 4" error occurs sometimes when deleting runtimes. However, the runtime can be deleted any way. Just want to make runtime controller's log more clear.
2023-01-09T16:47:58.362+0800 ERROR jindoctl.JindoRuntime.reconcileRuntimeDeletion controllers/runtime_controller.go:120 Failed to remove finalizer {"jindoruntime": "default/demo-dataset", "error": "Operation cannot be fulfilled on jindoruntimes.data.fluid.io \"demo-dataset\": StorageError: invalid object, Code: 4, Key: /c4905b67c177d4d1786040a5724a3fd3b/data.fluid.io/jindoruntimes/default/demo-dataset, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: 889221a2-5dd3-41cc-9be8-020d5bbdd135, UID in object meta: "}
github.com/fluid-cloudnative/fluid/pkg/controllers.(*RuntimeReconciler).ReconcileInternal
/Users/zhxu/go/src/github.com/fluid-cloudnative/fluid/pkg/controllers/runtime_controller.go:120
github.com/fluid-cloudnative/fluid/pkg/controllers/v1alpha1/jindo.(*RuntimeReconciler).Reconcile
/Users/zhxu/go/src/github.com/fluid-cloudnative/fluid/pkg/controllers/v1alpha1/jindo/jindoruntime_controller.go:104
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/Users/zhxu/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/Users/zhxu/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:311
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/Users/zhxu/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/Users/zhxu/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227
What you expect to happen: No error should be found in runtime controller's log in an ordinary case.
How to reproduce it
- create a dataset & runtime
- wait for the dataset and the runtime to be bound
- delete the dataset
Additional Information
It may be caused by https://github.com/kubernetes-sigs/controller-runtime/issues/1881 .