REPLICASET:SECONDARY> db.runCommand({count:"foo"})
{ "errmsg" : "not master", "note" : "from execCommand", "ok" : 0 }
REPLICASET:SECONDARY> db.runCommand({mapReduce:"foo",map:function(){},reduce:function(){},out:{inline:true}})
{ "errmsg" : "not master", "note" : "from execCommand", "ok" : 0 }
REPLICASET:SECONDARY> rs.slaveOk(true)
REPLICASET:SECONDARY> db.runCommand({count:"foo"})
{ "n" : 1, "ok" : 1 }
REPLICASET:SECONDARY> db.runCommand({mapReduce:"foo",map:function(){},reduce:function(){},out:{inline:true}})
{
"results" : [ ],
"timeMillis" : 17,
"counts" : {
"input" : 1,
"emit" : 0,
"reduce" : 0,
"output" : 0
},
"ok" : 1
}