Details
-
Bug
-
Resolution: Done
-
Major - P3
-
3.0.0
-
Fully Compatible
-
ALL
Description
Running db.shutdownServer() against a one member replica set fails with an error of "No electable secondaries caught up as of" with a timestamp. This makes no sense for a one member replica set.
We should either
- Allow this command to execute without error.
- Require {force: true} (as we do now) but provide a user-friendly message when run without and an example of the command to run.
> use admin> db.shutdownServer()2015-03-06T16:21:44.474-0500 I NETWORK trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed2015-03-06T16:21:44.475-0500 I NETWORK reconnect 127.0.0.1:27017 (127.0.0.1) okassert failed : unexpected error: Error: shutdownServer failed: No electable secondaries caught up as of 2015-03-06T16:21:44.475-0500Error: assert failed : unexpected error: Error: shutdownServer failed: No electable secondaries caught up as of 2015-03-06T16:21:44.475-0500at Error (<anonymous>)at doassert (src/mongo/shell/assert.js:11:14)at assert (src/mongo/shell/assert.js:20:5)at DB.shutdownServer (src/mongo/shell/db.js:212:9)at (shell):1:42015-03-06T16:21:44.476-0500 E QUERY Error: assert failed : unexpected error: Error: shutdownServer failed: No electable secondaries caught up as of 2015-03-06T16:21:44.475-0500at Error (<anonymous>)at doassert (src/mongo/shell/assert.js:11:14)at assert (src/mongo/shell/assert.js:20:5)at DB.shutdownServer (src/mongo/shell/db.js:212:9)at (shell):1:4 at src/mongo/shell/assert.js:13