[SERVER-20180] Provide mechanism to determine which kind of process is logging a message during test output Created: 28/Aug/15  Updated: 07/Oct/15  Resolved: 22/Sep/15

Status: Closed
Project: Core Server
Component/s: Sharding, Testing Infrastructure
Affects Version/s: 3.1.7
Fix Version/s: 3.1.9

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QuInt A (10/12/15)
Participants:

 Description   

Currently in the logs of our test output, mongod or mongos processes started by the test have log lines with the following format:

[js_test:<test name>] <timestamp>  m<port>| <message>

For example:

[js_test:stepdown_long_wait_time] 2015-08-28T04:30:18.299-0400  m31000| 2015-08-28T04:30:18.297-0400 I CONTROL  [main] ** WARNING: --rest is specified without --httpinterface,

Engineers that have experience with ReplSetTest and ShardingTest can tell which nodes are likely to be a mongos, a primary node, or a config server based on the port it's running on. (e.g 30999 for mongos, 29000-29002 for config servers, 31000+ for regular mongod's)

We should move away from this special association of ports with certain types of nodes/processes. Instead, the

 m31000|

part of the log message should include the information about which kind of process it is. Something like:

 md28343| <message from regular mongod>
  s37821| <message from mongos>
cfg21821| <message from config server>

This will make the logic of allocating ports for parallel testing much simpler, and hopefully will make reading the logs easier.

Even with this information, it would still be nice to group nodes of a replica set to have similar ports, or mongos's for the same cluster.



 Comments   
Comment by Githook User [ 22/Sep/15 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}

Message: SERVER-20180 Include which kind of process logged a message in test output
Branch: master
https://github.com/mongodb/mongo/commit/bb8b6a0d064e0879100d518cb1b5e089711bcb18

Comment by Charlie Swanson [ 10/Sep/15 ]

Appears to have made the noPassthrough suite unresponsive, so reverting until we can figure out why

Comment by Githook User [ 10/Sep/15 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}

Message: Revert "SERVER-20180 Include which kind of process logged a message in test output"

This reverts commit ed3c15504d8d5b6afaac95a6f5bbf4742fe51092.
Branch: master
https://github.com/mongodb/mongo/commit/7f1b07c07b2cdad14a60c2251839bf701b9b3818

Comment by Githook User [ 09/Sep/15 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}

Message: SERVER-20180 Include which kind of process logged a message in test output

Mostly applicable for tests that use ShardingTest
Branch: master
https://github.com/mongodb/mongo/commit/ed3c15504d8d5b6afaac95a6f5bbf4742fe51092

Comment by Spencer Brody (Inactive) [ 28/Aug/15 ]

This is a great idea. I would consider this a prerequisite for SERVER-18272, otherwise it's going to get much more difficult to make sense of logs for failed tests.

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