diff --git a/pkg/controllers/dataexport/reconcile.go b/pkg/controllers/dataexport/reconcile.go index 1f462e12f..a767ff43f 100644 --- a/pkg/controllers/dataexport/reconcile.go +++ b/pkg/controllers/dataexport/reconcile.go @@ -607,41 +607,6 @@ func parseExcludeFileListKey(pvcStorageClass string, excludeFileListValue string return excludeFileList, nil } -func appendPodLogToStork(jobName string, namespace string) { - // Get job and check whether it has live pod attaced to it - job, err := batch.Instance().GetJob(jobName, namespace) - if err != nil && !k8sErrors.IsNotFound(err) { - logrus.Infof("failed in getting job %v/%v with err: %v", namespace, jobName, err) - } - pods, err := core.Instance().GetPods( - job.Namespace, - map[string]string{ - "job-name": job.Name, - }, - ) - if err != nil { - logrus.Infof("failed in fetching job pods %s/%s: %v", namespace, jobName, err) - } - for _, pod := range pods.Items { - numLogLines := int64(50) - podDescribe, err := core.Instance().GetPodByName(pod.Name, pod.Namespace) - if err != nil { - logrus.Infof("Error fetching description of job-pod[%s] :%v", pod.Name, err) - } - logrus.Infof("start of job-pod [%s]'s description", pod.Name) - logrus.Infof("Describe %v", podDescribe) - logrus.Infof("end of job-pod [%s]'s description", pod.Name) - podLog, err := core.Instance().GetPodLog(pod.Name, pod.Namespace, &corev1.PodLogOptions{TailLines: &numLogLines}) - if err != nil { - logrus.Infof("error fetching log of job-pod %s: %v", pod.Name, err) - } else { - logrus.Infof("start of job-pod [%s]'s log...", pod.Name) - logrus.Infof(podLog) - logrus.Infof("end of job-pod [%s]'s log...", pod.Name) - } - } -} - func (c *Controller) createJobCredCertSecrets( dataExport *kdmpapi.DataExport, vb *kdmpapi.VolumeBackup, diff --git a/pkg/drivers/kopiadelete/kopiadelete.go b/pkg/drivers/kopiadelete/kopiadelete.go index 7b116c42f..cccc50d1e 100644 --- a/pkg/drivers/kopiadelete/kopiadelete.go +++ b/pkg/drivers/kopiadelete/kopiadelete.go @@ -159,11 +159,6 @@ func (d Driver) JobStatus(id string) (*drivers.JobStatus, error) { jobStatus = job.Status.Conditions[0].Type } - if err != nil { - errMsg := fmt.Sprintf("failed to get restart count for job %s/%s job: %v", namespace, name, err) - logrus.Errorf("%s: %v", fn, errMsg) - return nil, fmt.Errorf(errMsg) - } if utils.IsJobFailed(job) { utils.DisplayJobpodLogandEvents(job.Name, job.Namespace) diff --git a/pkg/drivers/kopiamaintenance/kopiamaintenance.go b/pkg/drivers/kopiamaintenance/kopiamaintenance.go index a98c227d0..8f279f605 100644 --- a/pkg/drivers/kopiamaintenance/kopiamaintenance.go +++ b/pkg/drivers/kopiamaintenance/kopiamaintenance.go @@ -147,11 +147,6 @@ func (d Driver) JobStatus(id string) (*drivers.JobStatus, error) { jobStatus = job.Status.Conditions[0].Type } - if err != nil { - errMsg := fmt.Sprintf("failed to get restart count for job %s/%s job: %v", namespace, name, err) - logrus.Errorf("%s: %v", fn, errMsg) - return nil, fmt.Errorf(errMsg) - } if utils.IsJobFailed(job) { utils.DisplayJobpodLogandEvents(job.Name, job.Namespace) diff --git a/pkg/drivers/kopiarestore/kopiarestore.go b/pkg/drivers/kopiarestore/kopiarestore.go index 1c34ecd32..3a723f874 100644 --- a/pkg/drivers/kopiarestore/kopiarestore.go +++ b/pkg/drivers/kopiarestore/kopiarestore.go @@ -134,11 +134,6 @@ func (d Driver) JobStatus(id string) (*drivers.JobStatus, error) { jobStatus = job.Status.Conditions[0].Type } - if err != nil { - errMsg := fmt.Sprintf("failed to get restart count for job %s/%s job: %v", namespace, name, err) - logrus.Errorf("%s: %v", fn, errMsg) - return nil, fmt.Errorf(errMsg) - } if utils.IsJobFailed(job) { utils.DisplayJobpodLogandEvents(job.Name, job.Namespace) diff --git a/pkg/drivers/nfscsirestore/nfscsirestore.go b/pkg/drivers/nfscsirestore/nfscsirestore.go index de81fe7c1..6590aca39 100644 --- a/pkg/drivers/nfscsirestore/nfscsirestore.go +++ b/pkg/drivers/nfscsirestore/nfscsirestore.go @@ -111,10 +111,6 @@ func (d Driver) JobStatus(id string) (*drivers.JobStatus, error) { return utils.ToJobStatus(0, errMsg, jobStatus), nil } - if utils.IsJobFailed(job) { - errMsg := fmt.Sprintf("check %s/%s job for details: %s", namespace, name, drivers.ErrJobFailed) - return utils.ToJobStatus(0, errMsg, jobStatus), nil - } if utils.IsJobPending(job) { logrus.Warnf("restore job %s is in pending state", job.Name) return utils.ToJobStatus(0, "", jobStatus), nil