[SERVER-27383] Require --replSet with --configsvr Created: 12/Dec/16  Updated: 29/Apr/22  Resolved: 28/Jul/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.4.0
Fix Version/s: 5.0.3, 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Marcos José Grillo Ramirez
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-54630 Remove tests that create a standalone... Closed
Duplicate
is duplicated by SERVER-32531 Require --shardsvrs not started in qu... Closed
Problem/Incident
causes SERVER-58999 require_api_version.js is not properl... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding EMEA 2021-08-09
Participants:
Linked BF Score: 50

 Description   

Starting in 3.4, the only valid way to run a config servers is as a replica set, however we still allow mongods to run with the clusterRole set to configsvr, but without any replica set options. We should error out at startup if we see that we are running as a config server without also being a replica set



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 05/Aug/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-27383 Disalow starting shards and config servers as standalone

... and restrict use of queryableBackupMode to only shards

(cherry picked from commit fc65780c5ea59878053440d23f67c543dc91fc71)
(cherry picked from commit 90052f7d16958f6f2b9187ac735b561b5f2270af)
Branch: v5.0
https://github.com/mongodb/mongo/commit/03616d9389a5d0575e9847e3a9bc304782d05f99

Comment by Githook User [ 02/Aug/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-27383 Restrict use of queryableBackupMode to only shards when starting a cluster
Branch: master
https://github.com/mongodb/mongo/commit/90052f7d16958f6f2b9187ac735b561b5f2270af

Comment by Githook User [ 28/Jul/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-27383 Disalow starting shards and config servers as standalone

... or without the queryableBackupMode flag
Branch: master
https://github.com/mongodb/mongo/commit/fc65780c5ea59878053440d23f67c543dc91fc71

Comment by Githook User [ 07/Jul/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: Revert "SERVER-27383 Disalow standalone nodes as config server if no queryableBackupMode is specified"

This reverts commit c1e968aab0e339d084f1f22b47ce4b2762536b3f.
Branch: master
https://github.com/mongodb/mongo/commit/8f12e6eedc23e67252f5c917098a98e4ff0b14e5

Comment by Githook User [ 06/Jul/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-27383 Disalow standalone nodes as config server if no queryableBackupMode is specified
Branch: master
https://github.com/mongodb/mongo/commit/c1e968aab0e339d084f1f22b47ce4b2762536b3f

Comment by Spencer Brody (Inactive) [ 12/Dec/16 ]

I think the process would be to restart without --replSet, --configsvr, and on a different port, to make absolutely sure nothing will contact it unintentionally. Actually using replSetReconfig to remove it from set entirely shouldn't be necessary.

If you don't change the port, I think the ShardingNetworkConnectionHook will still cause connection establishment to that node to fail for some operations since the isMaster reply won't include the 'configsvr' field it is expecting. Requests using DBClient, however, will go through the ShardingConnectionHook, which doesn't seem fail in that case, and I don't think there is any extra protection in that case. I don't think this change makes that situation any worse though.

Comment by Andy Schwerin [ 12/Dec/16 ]

So if you're doing maintenance on a CSRS node, what's the process: restart the node without --replSet or --cfgsvr, and go about your business? Or should you also be removing the node from the set? If you don't remove the node from the set, will the lack of --cfgsvr prevent the node from responding to "configserver-y" requests?

Generated at Thu Feb 08 04:15:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.