[SERVER-14162] Allow replica set member reference to be edited without doing an add/remove Created: 04/Jun/14 Updated: 10/Dec/14 Resolved: 05/Jun/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Cailin Nelson | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Sometimes, users make poor choices when configuring their replica set. For example, they might decide to rs.add('10.3.2.1') an internal IP, then later realize that they would prefer to use a hostname rs.add('foo.example.com'). Currently this can be accomplished with an rs.add/rs.remove sequence. It would be nice if this could be accomplished without the need for the rs.add/rs.remove (and fall out election events). This would only be possible if the user was replacing the reference with another reference to the same mongod. (I.e. if 10.3.2.1 and foo.example.com are honestly the same mongod). |
| Comments |
| Comment by Cailin Nelson [ 05/Jun/14 ] | ||
|
Excellent, thanks! | ||
| Comment by Eric Milkie [ 05/Jun/14 ] | ||
|
Yes, you can change whatever you want in the config document. It would be inadvisable to change the replset name, however. Also, I would avoid changing the id's of hosts. | ||
| Comment by Cailin Nelson [ 04/Jun/14 ] | ||
|
Would it be okay, for example, to edit them all at once? | ||
| Comment by Scott Hernandez (Inactive) [ 04/Jun/14 ] | ||
|
yes | ||
| Comment by Cailin Nelson [ 04/Jun/14 ] | ||
|
Ah... I had no idea. You're saying I could simply do
and so long as foo.example.com was a synonym for whatever was there before, this would be okay? | ||
| Comment by Scott Hernandez (Inactive) [ 04/Jun/14 ] | ||
|
A reconfigure can do this now, by just changing the host field for the member in the config. Are you just concerned about the possibility of an election happening? If so there are open requests for reducing the chances in reconfig causing stepdown/elections. |