Skip to content

Commit

Permalink
Add stopBalancer timeout; Retry setBalancerState; Improve logging (#1929
Browse files Browse the repository at this point in the history
) (#1941)

/cherry-pick

Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
1gtm authored Oct 2, 2023
1 parent a847461 commit 476c606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 476c606

Please sign in to comment.