summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2016-08-11 21:37:26 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2016-08-11 21:37:26 -0400
commit4e682143bca253a840f07604c0d7c522d48b5c29 (patch)
treedea48075b5b9fb72e201a29e9310443ad737f2b8
parent479256a420ebafa44932f86954743e9b439c14eb (diff)
downloadmongo-3.3.12.tar.gz
Revert "SERVER-25507 use node's existing options if restart flag passed to ReplSetTest's start()"r3.3.113.3.12
This reverts commit c31b1f07582a39a910de14aa9c72b4a9b1bbe10e.
-rw-r--r--jstests/replsets/auth1.js2
-rw-r--r--src/mongo/shell/replsettest.js17
2 files changed, 6 insertions, 13 deletions
diff --git a/jstests/replsets/auth1.js b/jstests/replsets/auth1.js
index 23054b9c38d..d6ced2108f4 100644
--- a/jstests/replsets/auth1.js
+++ b/jstests/replsets/auth1.js
@@ -52,7 +52,7 @@ load("jstests/replsets/rslib.js");
print("start up rs");
var rs = new ReplSetTest({"name": name, "nodes": 3});
print("restart 0 with keyFile");
- m = rs.start(0, {"keyFile": key1_600, noCleanData: true});
+ m = rs.restart(0, {"keyFile": key1_600});
print("restart 1 with keyFile");
rs.start(1, {"keyFile": key1_600});
print("restart 2 with keyFile");
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js
index 5634ba016a8..de35e14d9dd 100644
--- a/src/mongo/shell/replsettest.js
+++ b/src/mongo/shell/replsettest.js
@@ -914,16 +914,12 @@ var ReplSetTest = function(opts) {
options.binVersion = MongoRunner.versionIterator(options.binVersion);
}
- // If restarting a node, use its existing options as the defaults.
- options.restart = options.restart || restart;
- if (options.restart) {
- options = Object.merge(this.nodes[n].fullOptions, options);
- } else {
- options = Object.merge(defaults, options);
- }
+ options = Object.merge(defaults, options);
options = Object.merge(options, this.nodeOptions["n" + n]);
delete options.rsConfig;
+ options.restart = options.restart || restart;
+
var pathOpts = {node: n, set: this.name};
options.pathOpts = Object.merge(options.pathOpts || {}, pathOpts);
@@ -987,16 +983,13 @@ var ReplSetTest = function(opts) {
};
/**
- * Restarts a db without clearing the data directory by default, and using the node(s)'s
- * original startup options by default.
+ * Restarts a db without clearing the data directory by default. If the server is not
+ * stopped first, this function will not work.
*
* Option { startClean : true } forces clearing the data directory.
* Option { auth : Object } object that contains the auth details for admin credentials.
* Should contain the fields 'user' and 'pwd'
*
- * In order not to use the original startup options, use stop() (or stopSet()) followed by
- * start() (or startSet()) without passing restart: true as part of the options.
- *
* @param {int|conn|[int|conn]} n array or single server number (0, 1, 2, ...) or conn
*/
this.restart = function(n, options, signal, wait) {