[SERVER-65508] Resmoke should warn if there are lingering Mongo processes at startup time Created: 03/Mar/22  Updated: 29/Oct/23  Resolved: 01/Aug/22

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Daniel Moody
Resolution: Fixed Votes: 0
Labels: dp-qol, local-testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Dev Platform 2022-05-16, Dev Platform 2022-05-30, Dev Platform 2022-06-13, Dev Platform 2022-06-27, Dev Platform 2022-07-11, Dev Platform 2022-07-25
Participants:
Linked BF Score: 171

 Description   

The errors reported by resmoke.py are sometimes very cryptic and hard to diagnose, so it would be nice that it "eliminates" all the possible error conditions before it even proceeds executing.

One such condition is the presence of MongoD/MongoS processes from previous runs. If such processes exist, the errors reported by resmoke.py look like the ones at the end of the description.

It would be nice if resmoke.py printed a warning (or even better failed) if there are any MongoD/MongoS processes running when it starts.

Here is the errors reported due to a lingering MongoD process:

ubuntu@kal-virtual-workstation:~/workspace/mongo$ resmoke --suites=sharded_causally_consistent_jscore_passthrough
...
[js_test:job0_fixture_setup_0] An error occurred during the setup of ShardedClusterFixture (Job #0): Operation failure while configuring the replica set fixture: This node was not started with replication enabled., full error: {'ok': 0.0, 'errmsg': 'This node was not started with replication enabled.', 'code': 76, 'codeName': 'NoReplicationEnabled'}
...
[executor:js_test:job0] 13:59:42.218Z Encountered an error when tearing down the fixture.
Traceback (most recent call last):
  File "/home/ubuntu/workspace/mongo/buildscripts/resmokelib/testing/job.py", line 97, in __call__
    teardown_succeeded = self.manager.teardown_fixture(self.logger)
  File "/home/ubuntu/workspace/mongo/buildscripts/resmokelib/testing/job.py", line 386, in teardown_fixture
    self.report.logging_prefix = create_fixture_table(self.fixture)
  File "/home/ubuntu/workspace/mongo/buildscripts/resmokelib/testing/fixtures/interface.py", line 359, in create_fixture_table
    info: List[NodeInfo] = fixture.get_node_info()
  File "/home/ubuntu/workspace/mongo/buildscripts/resmokelib/testing/fixtures/shardedcluster.py", line 262, in get_node_info
    output += shard.get_node_info()
  File "/home/ubuntu/workspace/mongo/buildscripts/resmokelib/testing/fixtures/replicaset.py", line 772, in get_node_info
    output += node.get_node_info()
  File "/home/ubuntu/workspace/mongo/buildscripts/resmokelib/testing/fixtures/standalone.py", line 162, in get_node_info
    port=self.port, pid=self.mongod.pid)
AttributeError: 'NoneType' object has no attribute 'pid'
[executor] 13:59:42.219Z Waiting for threads to complete



 Comments   
Comment by Githook User [ 16/Jun/22 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: Revert "SERVER-65508 don't run resmoke tests if existing mongo processes exist"

This reverts commit 39f9ba8ff353eb86806d40b82168219696fcf91b.
Branch: master
https://github.com/mongodb/mongo/commit/c4ba4a3e074bcf6e5c64cbedf90e92ba0e0353c2

Comment by Githook User [ 16/Jun/22 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: Revert "SERVER-65508 Add option to opt out of resmoke detecting mongo processes."

This reverts commit 303a781ceb19938da362a7a6bb3480e5d784beb7.
Branch: master
https://github.com/mongodb/mongo/commit/16217d90546e70b936d5f7c3c2b467ee30a0202d

Comment by Githook User [ 15/Jun/22 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-65508 Add option to opt out of resmoke detecting mongo processes.
Branch: master
https://github.com/mongodb/mongo/commit/303a781ceb19938da362a7a6bb3480e5d784beb7

Comment by Githook User [ 15/Jun/22 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-65508 don't run resmoke tests if existing mongo processes exist
Branch: master
https://github.com/mongodb/mongo/commit/39f9ba8ff353eb86806d40b82168219696fcf91b

Comment by Robert Guo (Inactive) [ 12/Apr/22 ]

I added a label to evaluate this as part of improving the local testing experience.

Generated at Thu Feb 08 06:02:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.