Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3453

db.isMaster() reporting true for both arbiterOnly and passive (under certain configs)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.9.2
    • Component/s: Replication
    • Labels:
      None
    • Operating System:
      ALL

      Description

      When a replica set member is configured with both arbiterOnly and priority = 0 (admittedly a weird combination), then db.isMaster() on the arbiter reports true for both arbiterOnly and passive.

      Here's the replica set config:

      myset:PRIMARY> rs.conf()
      {
      "_id" : "myset",
      "version" : 1,
      "members" : [

      { "_id" : 0, "host" : "Kilimanjaro:10001" }

      ,

      { "_id" : 1, "host" : "Kilimanjaro:10002" }

      ,

      { "_id" : 2, "host" : "Kilimanjaro:10003", "priority" : 0, "arbiterOnly" : true }

      ]
      }
      myset:PRIMARY>

      Here's the result db.isMaster() on the arbiter:

      myset:ARBITER> db.isMaster()
      {
      "setName" : "myset",
      "ismaster" : false,
      "secondary" : false,
      "hosts" : [
      "Kilimanjaro:10002",
      "Kilimanjaro:10001"
      ],
      "arbiters" : [
      "Kilimanjaro:10003"
      ],
      "primary" : "Kilimanjaro:10001",
      "arbiterOnly" : true,
      "passive" : true,
      "maxBsonObjectSize" : 16777216,
      "ok" : 1
      }
      myset:ARBITER>

      The following four properties reported by db.isMaster() should probably be mutually exclusive:

      ismaster
      secondary
      arbiterOnly
      passive

        Activity

        • Comments
        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'}

        Message: arbiters are not passive SERVER-3453

        Conflicts:

        jstests/replsets/replsetarb2.js
        Branch: master
        https://github.com/mongodb/mongo/commit/2035656b204c6cbcd04dc515a87d6c675373bf94

        Show
        auto auto (Inactive) added a comment - Author: {u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'} Message: arbiters are not passive SERVER-3453 Conflicts: jstests/replsets/replsetarb2.js Branch: master https://github.com/mongodb/mongo/commit/2035656b204c6cbcd04dc515a87d6c675373bf94

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: