Skip to content

Commit 2743c64

Browse files
authored
Replace rs.secondaryOk() with rs.slaveOk() (#1379)
Signed-off-by: hmsayem <hmsayem@appscode.com>
1 parent c564646 commit 2743c64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/backup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,8 @@ func lockConfigServer(configSVRDSN, secondaryHost string) error {
658658
"config",
659659
"--host", secondaryHost,
660660
"--quiet",
661-
"--eval", "rs.secondaryOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');",
662-
}, adminCreds...)
661+
"--eval", "rs.slaveOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');",
662+
}, mongoCreds...)
663663

664664
if err := sh.Command(MongoCMD, args...).UnmarshalJSON(&v); err != nil {
665665
return err

0 commit comments

Comments
 (0)