[SERVER-10366] Error code 13135 running rs.reconfig() Created: 29/Jul/13  Updated: 09/Jul/16  Resolved: 29/Jul/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Nic Cottrell (Personal) Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

rhel6


Issue Links:
Related
related to DOCS-1754 Replica Set tag values must be strings Closed
Operating System: ALL
Steps To Reproduce:

On the primary, I do

use admin;
db.auth(...);
conf = rs.conf();

set conf to:

{
	"_id" : "sprawk",
	"version" : 4,
	"members" : [
		{
			"_id" : 0,
			"host" : "sture.transmachina.net:27017",
			"priority" : 2,
			"tags" : {
				"mem" : 40,
				"disk" : "spinning",
				"use" : "Unit"
			}
		},
		{
			"_id" : 1,
			"host" : "haga.transmachina.net:27017",
			"priority" : 2.5,
			"tags" : {
				"mem" : 64,
				"disk" : "spinning"
			}
		},
		{
			"_id" : 2,
			"host" : "oden.transmachina.net:27017",
			"arbiterOnly" : true
		},
		{
			"_id" : 3,
			"host" : "blanche.sprawk.com:27017",
			"tags" : {
				"mem" : 12,
				"disk" : "spinning",
				"use" : "Example"
			}
		}
	]
}

get the error:

 
sprawk:PRIMARY> rs.reconfig(conf);
{
	"errmsg" : "exception: bad config for member[0] wrong type for field (mem) 1 != 2",
	"code" : 13135,
	"ok" : 0
}

I looked up the error code at https://github.com/mongodb/mongo/blob/master/docs/errors.md but was blank.

Participants:

 Description   

Error code 13135 when adding tags to a RS config



 Comments   
Comment by Nic Cottrell (Personal) [ 29/Jul/13 ]

I fixed it by setting "mem" as a string. I suspect I just got confused by examples at http://docs.mongodb.org/manual/tutorial/configure-replica-set-tag-sets/ which set "rack" as an int.

Comment by Scott Hernandez (Inactive) [ 29/Jul/13 ]

All tags must be strings. The error message indicates that you passed in a double not a string ("type for field (mem) 1 != 2"). Type 1 is double, and type 2 string (bsonspec.org/#/specification).

The docs aren't clear in this respect and will be updated.

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