@@ -594,13 +594,11 @@ func GetSidPdbEdition(r client.Reader, config *rest.Config, ctx context.Context,
594
594
595
595
log := ctrllog .FromContext (ctx ).WithValues ("GetSidbPdbEdition" , req .NamespacedName )
596
596
597
- log .Info ("Finding Pods for the database " + req .Name )
598
597
sidbReadyPod , _ , _ , _ , err := FindPods (r , "" , "" , req .Name , req .Namespace , ctx , req )
599
598
if err != nil {
600
599
log .Error (err , err .Error ())
601
600
return "" , "" , "" , errors .New ("error while fetching sidb ready pod for sidb " + req .Name )
602
601
}
603
- log .Info ("Sidb Ready Pod name is " + sidbReadyPod .Name )
604
602
if sidbReadyPod .Name != "" {
605
603
out , err := ExecCommand (r , config , sidbReadyPod .Name , sidbReadyPod .Namespace , "" ,
606
604
ctx , req , false , "bash" , "-c" , GetSidPdbEditionCMD )
@@ -609,7 +607,7 @@ func GetSidPdbEdition(r client.Reader, config *rest.Config, ctx context.Context,
609
607
return "" , "" , "" , errors .New ("error while execing GetSidPdbEditionCMD on sidb " + req .Name )
610
608
}
611
609
log .Info (out )
612
- splitstr := strings .Split (out , "," )
610
+ splitstr := strings .Split (strings . TrimSpace ( out ) , "," )
613
611
return splitstr [0 ], splitstr [1 ], splitstr [2 ], nil
614
612
}
615
613
0 commit comments