0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

make addshard less strict SHARDING-75

This commit is contained in:
Eliot Horowitz 2010-01-26 13:49:55 -05:00
parent aa982f23f1
commit 1ed6940015

View File

@ -506,8 +506,7 @@ namespace mongo {
if ( host == "localhost" || host.find( "localhost:" ) == 0 ||
host == "127.0.0.1" || host.find( "127.0.0.1:" ) == 0 ){
if ( cmdObj["allowLocal"].type() != Bool ||
! cmdObj["allowLocal"].boolean() ){
if ( ! cmdObj["allowLocal"].trueValue() ){
errmsg =
"can't use localhost as a shard since all shards need to communicate. "
"allowLocal to override for testing";