Skip to content

Commit 3b98fbf

Browse files
authored
currentOp command update (#1995)
Signed-off-by: sayedppqq <sayed@appscode.com>
1 parent 03259fa commit 3b98fbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/lock.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ func checkIfSecondaryLockedAndSync(mongohost string) error {
129129

130130
x := make(map[string]interface{})
131131
args := append([]interface{}{
132-
"config",
132+
"admin",
133133
"--host", mongohost,
134134
"--quiet",
135-
"--eval", "JSON.stringify(db.currentOp())",
135+
"--eval", "rs.secondaryOk(); JSON.stringify(db.runCommand({currentOp:1}))",
136136
}, mongoCreds...)
137137
output, err := sh.Command(MongoCMD, args...).Output()
138138
if err != nil {

0 commit comments

Comments
 (0)