Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50085

Make it easier to correlate mongo process names, ports, PIDs in logs of fixtures started by resmoke

    • Fully Compatible
    • STM 2020-08-10, STM 2020-08-24
    • 2

      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.

            carl.worley@mongodb.com Raiden Worley (Inactive)
            william.schultz@mongodb.com William Schultz (Inactive)
            1 Vote for this issue
            10 Start watching this issue