-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.3 Required
-
Component/s: Replication
-
Fully Compatible
-
Repl 2019-08-26
Logic for spawning a specific version of MongoDB exists already in our JavaScript tests in the shell by searching for a <executable name>-<version suffix> file (e.g. mongod-4.0) on the PATH.
We will implement the same logic in resmoke so that mixed version replica set test suites that use ReplicaSetFixture and ShardedClusterFixture can be run. Evergreen uses /data/multiversion as the destination for storing the binaries downloaded from the multiversion setup script. Currently, although resmoke supports running an executable found on the PATH, it by default searches the current working directory for the mongod executable. We will change the behavior by using subprocess.Popen to search for the intended executable on the PATH by default. We will append both the current working directory and /data/multiversion to the PATH (in that order) to maintain compatibility with the existing multiversion setup script. It would do so by taking advantage of the existing env_vars option on resmoke.py’s Process class.
process_kwargs = self.shell_options.get("process_kwargs", {}).copy() env_vars = process_kwargs.get("env_vars", {}).copy() path = env_vars.get("PATH", os.environ.get("PATH", "")) os.pathsep.join(path, ".", os.normpath("/data/multiversion")) env_vars["PATH"] = path process_kwargs["env_vars"] = env_vars
- causes
-
SERVER-42849 resmoke.py should search for binaries in in cwd before PATH
- Closed