Skip to content

Commit e135cfb

Browse files
committed
removing logs and cleaning code
1 parent ea069ff commit e135cfb

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

commons/database/utils.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,11 @@ func GetSidPdbEdition(r client.Reader, config *rest.Config, ctx context.Context,
594594

595595
log := ctrllog.FromContext(ctx).WithValues("GetSidbPdbEdition", req.NamespacedName)
596596

597-
log.Info("Finding Pods for the database " + req.Name)
598597
sidbReadyPod, _, _, _, err := FindPods(r, "", "", req.Name, req.Namespace, ctx, req)
599598
if err != nil {
600599
log.Error(err, err.Error())
601600
return "", "", "", errors.New("error while fetching sidb ready pod for sidb " + req.Name)
602601
}
603-
log.Info("Sidb Ready Pod name is " + sidbReadyPod.Name)
604602
if sidbReadyPod.Name != "" {
605603
out, err := ExecCommand(r, config, sidbReadyPod.Name, sidbReadyPod.Namespace, "",
606604
ctx, req, false, "bash", "-c", GetSidPdbEditionCMD)
@@ -609,7 +607,7 @@ func GetSidPdbEdition(r client.Reader, config *rest.Config, ctx context.Context,
609607
return "", "", "", errors.New("error while execing GetSidPdbEditionCMD on sidb " + req.Name)
610608
}
611609
log.Info(out)
612-
splitstr := strings.Split(out, ",")
610+
splitstr := strings.Split(strings.TrimSpace(out), ",")
613611
return splitstr[0], splitstr[1], splitstr[2], nil
614612
}
615613

controllers/database/singleinstancedatabase_controller.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,15 +1500,11 @@ func (r *SingleInstanceDatabaseReconciler) createOrReplaceSVC(ctx context.Contex
15001500
if m.Spec.Image.PrebuiltDB {
15011501
r.Log.Info("Initiliazing free database sid, pdb, edition")
15021502
edition := ""
1503-
sid, pdb, edition, err := dbcommons.GetSidPdbEdition(r, r.Config, ctx, ctrl.Request{NamespacedName: types.NamespacedName{Namespace: m.Namespace, Name: m.Name}})
1503+
_, _, edition, err := dbcommons.GetSidPdbEdition(r, r.Config, ctx, ctrl.Request{NamespacedName: types.NamespacedName{Namespace: m.Namespace, Name: m.Name}})
15041504
if err != nil {
15051505
return requeueY, err
15061506
}
1507-
r.Log.Info("Sid for the database is " + sid)
1508-
r.Log.Info("Pdb for the database is " + pdb)
1509-
r.Log.Info("edition for the database is " + edition)
1510-
r.Log.Info("editon for the dataase is " + cases.Title(language.English).String(edition))
1511-
m.Status.Edition = strings.TrimSpace(cases.Title(language.English).String(edition))
1507+
m.Status.Edition = cases.Title(language.English).String(edition)
15121508
}
15131509

15141510
r.Log.Info("Setting connect string statues")

0 commit comments

Comments
 (0)