Skip to content

Commit

Permalink
Use rs.slaveOk to fix mongo 3.4.22 backup (#1885)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
  • Loading branch information
ArnobKumarSaha committed Aug 14, 2023
1 parent 70fa4ee commit 6583d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/backup.go
Expand Up @@ -701,7 +701,7 @@ func lockConfigServer(configSVRDSN, secondaryHost string) error {
"config",
"--host", secondaryHost,
"--quiet",
"--eval", "rs.secondaryOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');",
"--eval", "rs.slaveOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');",
}, mongoCreds...)

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

0 comments on commit 6583d90

Please sign in to comment.