From 2d3bb0d1c3152386d3560ced93f3d68d94db80c3 Mon Sep 17 00:00:00 2001 From: Arnob Kumar Saha Date: Fri, 22 Sep 2023 15:20:38 +0600 Subject: [PATCH] Add stopBalancer timeout; Retry setBalancerState; Improve logging (#1929) /cherry-pick Signed-off-by: Arnob kumar saha --- pkg/backup.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/backup.go b/pkg/backup.go index dad8417fd..a0cdb1023 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -635,7 +635,7 @@ func disabelBalancer(mongosHost string) error { err = json.Unmarshal(output, &v) if err != nil { - klog.Errorf("Unmarshal error while stopping balancer : %s \n", err.Error()) + klog.Errorf("Unmarshal error while stopping balancer : %s ; output = %s \n", err.Error(), output) return err } @@ -813,6 +813,7 @@ func unlockSecondaryMember(mongohost string) error { "--quiet", "--eval", "JSON.stringify(db.fsyncUnlock())", }, mongoCreds...) + output, err := sh.Command(MongoCMD, args...).Output() if err != nil { klog.Errorf("Error while running fsyncUnlock on secondary : %s ; output : %s \n", err.Error(), output)