Skip to content

Commit ebe9dcd

Browse files
Use rs.slaveOk to fix mongo 3.4.17 backup (#1884)
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
1 parent d433159 commit ebe9dcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ func lockConfigServer(configSVRDSN, secondaryHost string) error {
701701
"config",
702702
"--host", secondaryHost,
703703
"--quiet",
704-
"--eval", "rs.secondaryOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');",
704+
"--eval", "rs.slaveOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');",
705705
}, mongoCreds...)
706706

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

0 commit comments

Comments
 (0)