[SERVER-16079] No error message for invalid config in mixed version replset Created: 11/Nov/14  Updated: 03/Dec/14  Resolved: 12/Nov/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 2.8.0-rc1

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Operating System: ALL
Steps To Reproduce:

Start up a replica set in version 2.4, with this config:

{
	"_id" : "config-test",
	"version" : 2,
	"members" : [
		{
			"_id" : 0,
			"host" : "charlie-macbook-pro:41000"
		},
		{
			"_id" : 1,
			"host" : "charlie-macbook-pro:41001",
			"votes" : 2
		}
	]
}

then re-config to add a 2.8 node, resulting in this config:

{
	"_id" : "config-test",
	"version" : 3,
	"members" : [
		{
			"_id" : 0,
			"host" : "charlie-macbook-pro:41000"
		},
		{
			"_id" : 1,
			"host" : "charlie-macbook-pro:41001",
			"votes" : 2
		},
		{
			"_id" : 2,
			"host" : "charlie-macbook-pro:41002"
		}
	]
}

The 2.8 host remains in 'STARTUP' mode, but without any error messages besides the one mentioned below.

Participants:

 Description   

When there is an invalid config for a replica set in version 2.4, when a 2.8 member is added, the 2.8 member simply logs

2014-11-11T09:57:11.015-0500 I REPLSETS [rsSync] replSet warning did not receive a valid config yet, sleeping 5 seconds

Over and over again, without any error message.

Confirmed that the same thing happens when mixing 2.6 and 2.8. So it's not specific to 2.4.



 Comments   
Comment by Charlie Swanson [ 13/Nov/14 ]

Confirmed! Fixed. Logs the following error message:

2014-11-13T10:11:49.841-0500 W REPLSETS Not persisting new configuration in heartbeat response to disk because it is invalid: BadValue votes field value is 2 but must be 0 or 1
2014-11-13T10:11:49.842-0500 E REPLSETS [ReplicationExecutor] Could not validate configuration received from remote node; Removing self until an acceptable configuration arrives; BadValue votes field value is 2 but must be 0 or 1
2014-11-13T10:11:49.842-0500 I REPLSETS [ReplicationExecutor] transition to REMOVED

Comment by Charlie Swanson [ 13/Nov/14 ]

Edit: ignore that, forgot to recompile... Doh

Comment by Githook User [ 12/Nov/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-16079 Invalid number of votes is a validation error not a parse error
Branch: master
https://github.com/mongodb/mongo/commit/6e7f0bd5b2b36f292fc2e3ee72f4b4b0ee504a06

Generated at Thu Feb 08 03:39:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.