[SERVER-27070] Multiple mongos created when CSRS is not available during startup Created: 16/Nov/16 Updated: 28/Nov/16 Resolved: 28/Nov/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.2.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Darshan Shah | Assignee: | Kelsey Schubert |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | In a sharded cluster running MongoDb 3.2.5 with WT, force the CSRS nodes to not startup but still go ahead with starting mongos processes. |
||||
| Participants: | |||||
| Description |
|
On a sharded cluster running MongoDb 3.2.5 with WT, multiple mongos processes are created when the CSRS nodes are not up and ready at that time.
My expectation is that the mongos process should simply fail instead of exhibiting this behavior. I had created an issue for the same on the google user forums as well: |
| Comments |
| Comment by Kelsey Schubert [ 28/Nov/16 ] | |||||||||||||||
|
Hi darshan.shah@interactivedata.com, As Kevin explained on the mongodb-user group, there is no MongoDB process that spawns itself multiple times. It is expected that a mongos will launch if the the CSRS is not available. For further discussion around this behavior please post to the mongodb-users group. Thank you, | |||||||||||||||
| Comment by Darshan Shah [ 17/Nov/16 ] | |||||||||||||||
|
Here is the code snippet of the simple python script that I wrote to start the sharded cluster:
So the script is definitely not trying to start multiple instances of mongos. | |||||||||||||||
| Comment by Andy Schwerin [ 16/Nov/16 ] | |||||||||||||||
|
The mongos node stays up trying to contact the config servers indefinitely, to simplify the process of starting up whole clusters. That, at least, is as designed. I don't know why your script is launching multiple mongos nodes. Where did you get it? I believe that mongos should not return from --fork before it starts listening on the assigned port, but I'm not sure that it does. If it does, the way to check that mongos is done is to wait for the start of mongos --fork to return, and then to connect to the port and wait for an answer. samantha.ritter, I believe made some changes to the fork-and-listen behavior in the last six months. Perhaps she can supply more detail. |