diff --git a/pkg/lock.go b/pkg/lock.go index 1fd890c70..ad376ab5b 100644 --- a/pkg/lock.go +++ b/pkg/lock.go @@ -129,10 +129,10 @@ func checkIfSecondaryLockedAndSync(mongohost string) error { x := make(map[string]interface{}) args := append([]interface{}{ - "config", + "admin", "--host", mongohost, "--quiet", - "--eval", "JSON.stringify(db.currentOp())", + "--eval", "rs.secondaryOk(); JSON.stringify(db.runCommand({currentOp:1}))", }, mongoCreds...) output, err := sh.Command(MongoCMD, args...).Output() if err != nil {