[BUG/Feature] when delete job, there are error logs
Closed this issue · 3 comments
HeGaoYuan commented
What happened:
When I delete the job with kubectl delete mpijob, then the kubedl has a ERROR level log as below(the code line maybe different with the latest commit). Actually, there are no error things happened. I think it should not produce a ERROR level log.
2021-10-20T12:24:11.451Z ERROR mpi-controller mpi job not found {"namespace": "kubedl", "name": "mpi-demo", "error": "MPIJob.training.kubedl.io \"mpi-demo\" not found"}
github.com/go-logr/zapr.(*zapLogger).Error
/go/pkg/mod/github.com/go-logr/zapr@v0.4.1-0.20210423233217-9f3e0b1ce51b/zapr.go:132
github.com/alibaba/kubedl/controllers/mpi.(*MPIJobReconciler).GetJobFromInformerCache
/workspace/controllers/mpi/job.go:42
github.com/alibaba/kubedl/pkg/job_controller.(*JobController).resolveControllerRef
/workspace/pkg/job_controller/job_controller.go:179
github.com/alibaba/kubedl/pkg/job_controller.(*JobController).OnPodDeleteFunc
/workspace/pkg/job_controller/pod.go:150
sigs.k8s.io/controller-runtime/pkg/predicate.Funcs.Delete
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/predicate/predicate.go:76
sigs.k8s.io/controller-runtime/pkg/source/internal.EventHandler.OnDelete
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/source/internal/eventsource.go:170
k8s.io/client-go/tools/cache.(*processorListener).run.func1
/go/pkg/mod/k8s.io/client-go@v0.20.7/tools/cache/shared_informer.go:779
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
/go/pkg/mod/k8s.io/apimachinery@v0.20.7/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
/go/pkg/mod/k8s.io/apimachinery@v0.20.7/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
/go/pkg/mod/k8s.io/apimachinery@v0.20.7/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
/go/pkg/mod/k8s.io/apimachinery@v0.20.7/pkg/util/wait/wait.go:90
k8s.io/client-go/tools/cache.(*processorListener).run
/go/pkg/mod/k8s.io/client-go@v0.20.7/tools/cache/shared_informer.go:771
k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1
/go/pkg/mod/k8s.io/apimachinery@v0.20.7/pkg/util/wait/wait.go:73
What you expected to happen:
How to reproduce it:
Anything else we need to know?:
Environment:
- KubeDL version:
- Kubernetes version (use
kubectl version
): - OS (e.g:
cat /etc/os-release
): - Kernel (e.g.
uname -a
): - Install tools:
- Others:
SimonCqk commented
I'll optimize logging soon
SimonCqk commented
@HeGaoYuan please take a review #202