[SERVER-7357] Clean up how the shell launches processes Created: 15/Oct/12  Updated: 06/Dec/22  Resolved: 19/Nov/21

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-4237 Enable the full js test suite to run ... Closed
is depended on by SERVER-7317 Make dur tests pass with auth Closed
is depended on by SERVER-7356 Make disk tests pass with auth Closed
Related
is related to SERVER-7914 Regularize how jstests create/request... Backlog
Assigned Teams:
Server Tooling & Methods
Participants:

 Description   

Currently there are multiple ways to launch processes in the shell, some of which return the port number of a started mongo process and never join with it, others which wait for the process to terminate and join with it and return the exit code. There is no good way to get the exit code of a process launched that we don't expect to terminate immediately (like a mongod for example). We should have just one interface for launching processes that is flexible enough to handle both long-running mongod processes and short-lived processes like tools.

There should be one function that launches a process and returns its PID, and another that joins with a PID and returns it's exit code. Those should be the only native code C++ functions built into the shell. The existing javascript functions for launching processes (runMongoProgram, startMongoProgram, runMongoProgramNoConnect, etc.) should then be re-written using these new C++ functions for backwards compatibility sake, and marked as deprecated. New, clean javascript functions should then be written for all new tests that need to launch new sub-processes. This will also need a clean way to handle and distinguish the cases where the newly launches process should and should not have username and password arguments appended to it's command line launch statement for running tests with auth.


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