From 476c60636199a1d627d47b5d0d2d6e692a3414e4 Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Sun, 1 Oct 2023 22:19:27 -0700 Subject: [PATCH] Add stopBalancer timeout; Retry setBalancerState; Improve logging (#1929) (#1941) /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)