[SERVER-26493] Failure to elect new primary when primary host goes away Created: 05/Oct/16 Updated: 07/Oct/16 Resolved: 06/Oct/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 3.2.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Menno Finlay-Smits | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Steps To Reproduce: | Bring up a 3 node replicaset and wait for the nodes to settle. The problem doesn't happen every time but seems to be more likely if the primary is killed soon after the secondaries have joined the replicaset and synced. I am able to manually recover the replicaset by adjusting member priorities using rs.reconfig() but I would have expected for mongodb to be able to recover from this scenario itself. |
| Participants: |
| Description |
|
I am able to regularly trigger a situation where when the machine hosting the primary node in a replicaset goes away, the remaining nodes fail to elect a new primary and stay as secondaries. The attached files are: 1.log - mongod logs for the primary up until the machine was stopped. |
| Comments |
| Comment by Menno Finlay-Smits [ 07/Oct/16 ] |
|
Duh! Sorry for wasting your time. Our application manages replicasets automatically and the way it handles new members means that there's a ~30s window where new members have a priority of 0. |
| Comment by Kelsey Schubert [ 06/Oct/16 ] |
|
Hi menn0 Thanks for your report. It appears that the two secondary nodes are configured to have priority 0. This means that they cannot become primary. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group. Kind regards, |