[SERVER-50085] Make it easier to correlate mongo process names, ports, PIDs in logs of fixtures started by resmoke Created: 02/Jul/19  Updated: 29/Oct/23  Resolved: 07/Aug/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: William Schultz (Inactive) Assignee: Raiden Worley (Inactive)
Resolution: Fixed Votes: 1
Labels: quick-win, tig-qwin-eligible, tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-72860 Python exceptions in create_fixture_t... Closed
related to SERVER-54723 Shorten resmoke log prefixes Closed
related to SERVER-55548 resmoke.py reports stale "Fixture sta... Closed
related to SERVER-42045 Consider adding PID into the log mess... Closed
is related to SERVER-32735 Log process port numbers in passthrou... Open
is related to SERVER-47922 Make it easier to see what process is... Closed
is related to SERVER-49096 Have replica set tests log a pid/port... Closed
Backwards Compatibility: Fully Compatible
Sprint: STM 2020-08-10, STM 2020-08-24
Participants:
Story Points: 2

 Description   

For test suites whose underlying mongod/s processes are managed by resmoke.py, it can be hard to figure out the mapping between mongo process ports, replica states, and PIDs in the log messages. For example, in the replica_sets_jscore_passthrough suite, a log line only shows the state of that replica set node:

[ReplicaSetFixture:job9:primary] 2019-07-02T02:09:03.027+0000 I  INDEX    [conn98] validated collection config.transactions (UUID: f6c6dde1-fc12-4608-b439-c09508cfee9e)

Ideally, we would have an easy way to know, when looking at any log line, the replica set state (primary, secondary, etc.), the PID, and the port that the mongo process started up on. In sharding suites we also want to know whether the node is a config server, mongoS, etc. Currently, figuring out this information requires one to trace back to the beginning of the logs (which may be in an entirely separate file if the fixture was not restarted recently) and look for startup messages with this information. One thought would be to print out a complete mapping of ports, PIDs, and current replica set states at the beginning of every new test execution. We could also include this info directly in the log message prefix.



 Comments   
Comment by Githook User [ 07/Aug/20 ]

Author:

{'name': 'Carl Raiden Worley', 'email': 'carl.worley@10gen.com', 'username': 'aggrand'}

Message: SERVER-50085 Make it easier to correlate mongo process names, ports, PIDs in logs of fixtures started by resmoke
Branch: master
https://github.com/mongodb/mongo/commit/16dbe5a28b3a10a2f816ae882543c3b371ab42a0

Comment by Raiden Worley (Inactive) [ 04/Aug/20 ]

We decided to go with the approach of printing a table of this information at the beginning of a test, and re-printing it after nodes restart.

Comment by Daniel Gottlieb (Inactive) [ 30/Jul/20 ]

I filed TIG-2614.

Comment by Brooke Miller [ 30/Jul/20 ]

In triaging, we discussed how we want to be able to shrink log lines to avoid so much scrolling when viewing logs, so daniel.gottlieb will create a follow-up ticket.

Comment by Robert Guo (Inactive) [ 24/Jul/20 ]

Yes! We will be prioritizing this ticket as part of the quick wins bucket for the upcoming QP.

Comment by Judah Schvimer [ 24/Jul/20 ]

Now that SERVER-47922 is complete, this ticket (or one similar) becomes even more valuable since PIDs will be more ubiquitous. Can we consider prioritizing it? Having this extend to ReplSetTest and ShardingTest would also be super valuable.

Comment by William Schultz (Inactive) [ 02/Jul/19 ]

By including the raw PID, it should also make it easier to understand the files produced by the hang analyzer, since they are generated with the underlying PID e.g. debugger_mongod_33255_raw_stacks.log. Including only the port number doesn't help you there.

Generated at Thu Feb 08 05:21:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.