juju.worker.peergrouper worker.go:211 cannot set replicaset: Found two member configurations with same _id field, members.0._id == members.1._id == 1

Bug #1704075 reported by Alvaro Uria
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
New
Undecided
Unassigned

Bug Description

* Juju 2.2.1, Xenial
* "juju enable-ha" has been run, but PRIMARY has no replicasets
* controllers #1 and #2 show as started and juju-db is up, however no machine-{1,2} users exist (so, unable to connect to slave mongos)
 - by stopping jujud-machine-{1,2}, stopping juju-db and (after backup) removing juju-mongodb3.2 deb pkg, such pkg is reinstalled after starting jujud-machine-{1,2} but status becomes the same (in "juju status --format yaml", they show up as "adding-vote"; while controller #0 "has-vote")
* machine-0.log shows the following error:
2017-07-13 07:17:10 ERROR juju.worker.peergrouper worker.go:211 cannot set replicaset: Found two member configurations with same _id field, members.0._id == members.1._id == 1

juju:PRIMARY> rs.status()
{
        "set" : "juju",
        "date" : ISODate("2017-07-13T07:17:59.088Z"),
        "myState" : 1,
        "term" : NumberLong(1),
        "heartbeatIntervalMillis" : NumberLong(2000),
        "members" : [
                {
                        "_id" : 1,
                        "name" : "127.0.0.1:37017",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "uptime" : 1721970,
                        "optime" : {
                                "ts" : Timestamp(1499930278, 44),
                                "t" : NumberLong(1)
                        },
                        "optimeDate" : ISODate("2017-07-13T07:17:58Z"),
                        "electionTime" : Timestamp(1498208312, 2),
                        "electionDate" : ISODate("2017-06-23T08:58:32Z"),
                        "configVersion" : 2,
                        "self" : true
                }
        ],
        "ok" : 1
}
juju:PRIMARY> rs.conf()
{
        "_id" : "juju",
        "version" : 2,
        "protocolVersion" : NumberLong(1),
        "members" : [
                {
                        "_id" : 1,
                        "host" : "127.0.0.1:37017",
                        "arbiterOnly" : false,
                        "buildIndexes" : true,
                        "hidden" : false,
                        "priority" : 1,
                        "tags" : {
                                "juju-machine-id" : "0"
                        },
                        "slaveDelay" : NumberLong(0),
                        "votes" : 1
                }
        ],
        "settings" : {
                "chainingAllowed" : true,
                "heartbeatIntervalMillis" : 2000,
                "heartbeatTimeoutSecs" : 10,
                "electionTimeoutMillis" : 10000,
                "getLastErrorModes" : {

                },
                "getLastErrorDefaults" : {
                        "w" : 1,
                        "wtimeout" : 0
                },
                "replicaSetId" : ObjectId("594cd837331fb00c0fa13128")
        }
}

On a test environment, I checked that "juju enable-ha" creates mongo replicasets with ids 1, 2 and 3 (for controllers #0, #1 and #2, respectively).

Please let me know if you need further information.

Tags: 4010
Revision history for this message
Alvaro Uria (aluria) wrote :

Such test env uses an openstack endpoint (keystone auth, nova instances).

Issue related to bug 1704072

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.