[SERVER-1500] rs doesn't elect primary if initiated by an arbiter Created: 27/Jul/10  Updated: 12/Jul/16  Resolved: 29/Jul/10

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 1.5.7

Type: Bug Priority: Major - P3
Reporter: Kristina Chodorow (Inactive) Assignee: Dwight Merriman
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

That is, if db is connected to sf1:27017 and you set sf1:27017 to be arbiterOnly in replSetInitiate, the other machines will endlessly spin with:

Tue Jul 27 18:33:43 [rs Manager] replSet info not trying to elect self, do not yet have a complete set of data from any point in time
Tue Jul 27 18:33:49 [rs Manager] replSet info not trying to elect self, do not yet have a complete set of data from any point in time
Tue Jul 27 18:33:55 [rs Manager] replSet info not trying to elect self, do not yet have a complete set of data from any point in time

I started up:
./mongod --replSet unicomplex/ubuntu:27017,ubuntu:27018 --dbpath ~/dbs/blort1
./mongod --replSet unicomplex/ubuntu:27017,ubuntu:27018 --dbpath ~/dbs/blort2 --port 27018
./mongod --replSet unicomplex/ubuntu:27017 --dbpath ~/dbs/blort3 --port 27019

Then ran:
> rs.initiate({_id:"unicomplex", members:[{_id:0,host:"ubuntu:27019"}, {_id:1, host:"ubuntu:27018"}, {_id:2, host:"ubuntu:27017", arbiterOnly:true}]})

test in replsetarb1.js



 Comments   
Comment by Dwight Merriman [ 29/Jul/10 ]

resolved by disallowing.

if you want, you can keep the test and make it verify that the initiate returns an error.

Comment by Alex [ 29/Jul/10 ]

+1

Comment by Che-Ching Wu [ 29/Jul/10 ]

This works here. However, I've got this kind of message 'replSet info not trying to elect self, do not yet have a complete set of data from any point in time'.

My commands are:

  1. /opt/mongodb/bin/mongod --fork --dbpath /var/lib/mongo/ --logpath /var/log/mongo/mongod.log --logappend --rest --replSet shard1/vm-shard11,vm-shard12,vm-arbiter 1
  1. echo 'cfg = {_id: "shard1", members:[{_id: 0, host:"vm-shard11"},{_id: 1, host:"vm-shard12"},{_id: 2, host:"vm-arbiter1", "arbiterOnly": true}]}; rs.initiate(cfg);' | /opt/mongodb/bin/mongo
Comment by auto [ 27/Jul/10 ]

Author:

{'login': '', 'name': 'Kristina Chodorow', 'email': 'k@ubuntu.(none)'}

Message: failing rs test SERVER-1500
http://github.com/mongodb/mongo/commit/7f05f937e823c9b9081defd39b2b480512c22dc0

Generated at Thu Feb 08 02:57:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.