[SERVER-31464] replSetInitiate with no explicit configuration should generate config with localhost by default Created: 09/Oct/17 Updated: 30/Oct/23 Resolved: 14/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking, Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Sara Golemon |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Platforms 2017-10-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently if you run replSetInitiate without providing an initial config, mongod will attempt to deduce its hostname by inspecting the available network interfaces, and then will generate a default configuration with itself as the only member, addressed by the hostname it discovered. Now that mongods bind only to localhost by default ( |
| Comments |
| Comment by Githook User [ 15/Oct/17 ] |
|
Author: {'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon', 'username': 'sgolemon'}Message: |
| Comment by Eric Milkie [ 09/Oct/17 ] |
|
SGTM. |
| Comment by Spencer Brody (Inactive) [ 09/Oct/17 ] |
|
And if the node is on a different machine, yes you'd have to do a manual reconfig to switch over from localhost to hostname |
| Comment by Spencer Brody (Inactive) [ 09/Oct/17 ] |
|
You pass the hostname to rs.add(), you'd just have to specify a localhost name to rs.add() |
| Comment by Eric Milkie [ 09/Oct/17 ] |
|
If you generate a default config using "localhost", I don't think you'll be able to subsequently add a node to such a configuration with the rs.add() helper. (You would have to edit the config by hand to use real hostnames, for that to work.) |