[SERVER-13501] Inconsistent (?) handling of replSet in getCmdLineOpts.parsed Created: 06/Apr/14  Updated: 06/Dec/22  Resolved: 15/Sep/16

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.6.0-rc3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Cailin Nelson Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: polish
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

In a mongod started up with the following argv, I would expect the parsed field to contain replication.replSetName not replication.replSet.

I realize that it is debatable whether or not the current behavior is wrong. However, I would expect the output of parsed to match the YAML-style in all cases, not be a mixture of YAML-style and legacy-style.

backup_test:PRIMARY> db.runCommand('getCmdLineOpts')
{
	"argv" : [
		"mongod",
		"--port=27000",
		"--replSet=backup_test",
		"--dbpath=/Users/cailin/Documents/code/mms/data/db/replica/backup_test/backup_test_0",
		"--logpath=/Users/cailin/Documents/code/mms/data/db/replica/backup_test/backup_test_0/mongodb.log",
		"--logappend",
		"--nojournal"
	],
	"parsed" : {
		"net" : {
			"port" : 27000
		},
		"replication" : {
			"replSet" : "backup_test"
		},
		"storage" : {
			"dbPath" : "/Users/cailin/Documents/code/mms/data/db/replica/backup_test/backup_test_0",
			"journal" : {
				"enabled" : false
			}
		},
		"systemLog" : {
			"destination" : "file",
			"logAppend" : true,
			"path" : "/Users/cailin/Documents/code/mms/data/db/replica/backup_test/backup_test_0/mongodb.log"
		}
	},
	"ok" : 1
}



 Comments   
Comment by Matt Kangas [ 14/Jul/14 ]

After conferring with milkie, the path forward seems to be:

  • Save argv --replSet as replication.replSetName
  • Discard the seed list if specified. Do not save it, do not use.

This will change the optional seed list from "deprecated" to "obsolete" and we will not backport this change.

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