-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Security
-
ALL
-
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
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?