Skip to content

Commit

Permalink
Adding logs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnugeorge committed May 14, 2019
1 parent 112f9f8 commit ce1242a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/v1alpha2/experiment/util/webhook_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func validateSupportedJob(job *unstructured.Unstructured) error {
return nil
}
}
return fmt.Errorf("Cannot support to run job: %v supported jobs: %v", gvk, supportedJobs)
return fmt.Errorf("Job type %v not supported", gvk)
}

func validateForCreate(inst *ep_v1alpha2.Experiment) error {
Expand Down
4 changes: 3 additions & 1 deletion pkg/controller/v1alpha2/trial/trial_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
})
if err != nil {
if meta.IsNoMatchError(err) {
log.Error(err, "Job watch error: CRD might be missing. Please install CRD and restart katib-controller", " CRD kind", gvk.Kind)
log.Info("Job watch error. CRD might be missing. Please install CRD and restart katib-controller", "CRD Kind", gvk.Kind)
continue
}
return err
} else {
log.Info("Job watch added successfully", "CRD Kind", gvk.Kind)
}
}
log.Info("Trial controller created")
Expand Down

0 comments on commit ce1242a

Please sign in to comment.