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

Free Monitoring registration and metrics pings are incomplete for uninitialized repl set members

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      1. Start an instance: mongod --replSet=stuff [...]
      2. Shell into the instance: mongo
      3. Enable Free Monitoring: db.enableFreeMonitoring()

      Show
      1. Start an instance: mongod --replSet=stuff [...] 2. Shell into the instance: mongo 3. Enable Free Monitoring: db.enableFreeMonitoring()

      Description

      When a mongod is started with --replSet=blah but rs.initialize() hasn't been called yet, both the register request and the metrics request have missing/broken values, though in different ways:

      On register request, the IsMaster struct is missing all host/hostname values, eg.:

      "IsMaster":
      {
      "LocalTime":"2018-08-02T20:52:50.864-04:00",
      "IsMaster":false,
      "Msg":"",
      "SetName":"", // <-- missing
      "Hosts":null, // <-- missing
      "IsSecondary":false,
      "PrimaryHostPort":"", // <-- missing
      "HostPort":"", // <-- missing
      "ArbiterOnly":false
      }
      

      (The missing values are pretty reasonable for an uninitialized repl set member - except I'd expect HostPort to have something.)

      On metrics pings, a number of the discovery structs are nil altogether, eg.:

      IsMaster:0xc420408020 
      BuildInfo:<nil> 
      HostInfo:<nil> 
      StorageEngine:<nil> ReplSetGetConfig:<nil> RsStatus:0xc420408378 OplogUUID: 
      ClusterManager:{Id:[] NextVersion:0 LastVersion:0} ServerStatus:0xc4204080c0
      

      This "weird" state persists until rs.initialize() is called (you can even restart it and still see these weird payloads), at which point everything seems to snap into place and all is well.

      Note: we've worked around both of these issues in CLOUDP-31606 and CLOUDP-31813, so this isn't a massively high priority from our perspective, but it might indicate issues worth addressing from your perspective?

        Attachments

          Activity

            People

            Assignee:
            backlog-server-devtools Backlog - Dev Tools
            Reporter:
            duncan.armstrong Duncan Armstrong
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated: