Skip to content

Commit

Permalink
Merge remote-tracking branch 'torodb/hotfix-instant-value-copy' into
Browse files Browse the repository at this point in the history
merger-hotfix-instant-value-copy

Conflicts:
	main/pom.xml
	pom.xml
	reporting/pom.xml
	service/pom.xml
  • Loading branch information
teoincontatto committed Jun 29, 2017
2 parents 7891055 + 78d1a8f commit a37d67c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion main/src/main/java/com/torodb/stampede/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.torodb.packaging.config.model.backend.BackendPasswordConfig;
import com.torodb.packaging.config.model.backend.postgres.AbstractPostgres;
import com.torodb.packaging.config.model.protocol.mongo.AbstractShardReplication;
import com.torodb.packaging.config.model.protocol.mongo.AuthMode;
import com.torodb.packaging.config.model.protocol.mongo.MongoPasswordConfig;
import com.torodb.packaging.config.util.BackendImplementationVisitor;
import com.torodb.packaging.config.util.BackendImplementationVisitorWithDefault;
Expand Down Expand Up @@ -222,7 +223,21 @@ public String getDatabase() {
+ "Please add following line to file " + postgres.getToropassFile() + ":\n"
+ postgres.getHost() + ":" + postgres.getPort() + ":"
+ postgres.getDatabase() + ":" + postgres.getUser() + ":<password>\n"
+ "Replace <password> for database user " + postgres.getUser() + "'s password");
+ "Replace <password> with the password of backend user " + postgres.getUser());
}
}

for (AbstractShardReplication shard : shards) {
if (shard.getAuth().getMode().value() != AuthMode.disabled
&& config.getReplication().getAuth().getPassword() == null) {
throw new SystemException("No password provided for database user "
+ shard.getAuth().getUser().value() + ".\n\n"
+ "Please add following line to file "
+ config.getReplication().getMongopassFile() + ":\n"
+ shard.getSyncSource().value() + ":" + shard.getAuth().getSource().value()
+ ":" + shard.getAuth().getUser().value() + ":<password>\n"
+ "Replace <password> with the password of mongodb user "
+ shard.getAuth().getUser().value());
}
}

Expand Down

0 comments on commit a37d67c

Please sign in to comment.