[SERVER-31013] Make serverExitCodeMap useful to detect if server crashed on startup before connection established Created: 08/Sep/17 Updated: 30/Oct/23 Resolved: 18/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | 3.5.12 |
| Fix Version/s: | 3.6.6, 3.7.6 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Robert Guo (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||||||||||
| Sprint: | TIG 2018-04-23 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 56 | ||||||||||||||||||||
| Description |
| Comments |
| Comment by Githook User [ 19/Jun/18 ] | |||||||||||||
|
Author: {'username': 'guoyr', 'name': 'Robert Guo', 'email': 'robert.guo@10gen.com'}Message: | |||||||||||||
| Comment by Githook User [ 19/Apr/18 ] | |||||||||||||
|
Author: {'email': 'robert.guo@10gen.com', 'username': 'guoyr', 'name': 'Robert Guo'}Message: | |||||||||||||
| Comment by Githook User [ 18/Apr/18 ] | |||||||||||||
|
Author: {'email': 'robert.guo@10gen.com', 'username': 'guoyr', 'name': 'Robert Guo'}Message: | |||||||||||||
| Comment by Max Hirschhorn [ 30/Mar/18 ] | |||||||||||||
|
Based on Samy's comment, I think we might be able to make the serverExitCodeMap useful for being able to check the return code of a mongod or mongos process that fails to start up by changing the key from the pid of the process to the port of the process. The issue with using the pid is that while unique for that instance of attempting to spawn the process, the caller of MongoRunner.runMongod() isn't able to learn of the pid because the function returns null rather than a Mongo connection object. | |||||||||||||
| Comment by Samyukta Lanka [ 30/Mar/18 ] | |||||||||||||
|
In the linked BF-8591, replTest.start is failing because the node fasserts before start is called and waitForConnect was set to true in It can be fixed by surrounding those lines in a try/catch:
| |||||||||||||
| Comment by Max Hirschhorn [ 22/Mar/18 ] | |||||||||||||
I don't think we should have MongoRunner always ignore an exit code of 100 as it undermines the ability to have tests explicitly state which processes should exit with which return codes. Looking back at some of the discussion in
| |||||||||||||
| Comment by Kaloian Manassiev [ 21/Mar/18 ] | |||||||||||||
|
From Max's description in the linked BF-6118 it looks like MongoRunner should explicitly ignore code 100 always due to the way PID/Port mapping is tracked. Passing this ticket on to TIG. |