summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2022-03-08 17:55:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-28 18:37:58 +0000
commit6da1c8ecb87cbf421054a1b426c14d36481df27f (patch)
treed8d85c23f444ce07460a16d5562dd656e57344ac
parentf7cb4b6b001045eb51465bfdd232d1c6852df8ab (diff)
downloadmongo-6da1c8ecb87cbf421054a1b426c14d36481df27f.tar.gz
SERVER-61032 Fix hang_hanalyzer $PATH
(cherry picked from commit 682f784e93b1602f0dcd74115e2105e1433857f5)
-rw-r--r--buildscripts/resmokelib/powercycle/remote_hang_analyzer/__init__.py2
-rwxr-xr-xbuildscripts/setup_spawnhost_coredump4
-rw-r--r--evergreen/hang_analyzer.sh4
3 files changed, 5 insertions, 5 deletions
diff --git a/buildscripts/resmokelib/powercycle/remote_hang_analyzer/__init__.py b/buildscripts/resmokelib/powercycle/remote_hang_analyzer/__init__.py
index e208a37a05a..a742aace0d3 100644
--- a/buildscripts/resmokelib/powercycle/remote_hang_analyzer/__init__.py
+++ b/buildscripts/resmokelib/powercycle/remote_hang_analyzer/__init__.py
@@ -48,7 +48,7 @@ class RunHangAnalyzerOnRemoteInstance(PowercycleCommand):
# we don't want to evaluate the local python variable, but instead pass the python string
# so the remote host will use the right python when the virtualenv is sourced.
cmds = f"{cmds}; cd {remote_dir}"
- cmds = f"{cmds}; PATH=\"/opt/mongodbtoolchain/v3/bin:$PATH\" python buildscripts/resmoke.py hang-analyzer {hang_analyzer_option}"
+ cmds = f"{cmds}; PATH=\"$PATH:/opt/mongodbtoolchain/v3/bin\" python buildscripts/resmoke.py hang-analyzer {hang_analyzer_option}"
self.remote_op.operation(SSHOperation.SHELL, cmds, None)
file_param = []
diff --git a/buildscripts/setup_spawnhost_coredump b/buildscripts/setup_spawnhost_coredump
index 474d5d895ef..354c4539b71 100755
--- a/buildscripts/setup_spawnhost_coredump
+++ b/buildscripts/setup_spawnhost_coredump
@@ -14,7 +14,7 @@ cat >> ~/.profile <<EOF
cat ~/.setup_spawnhost_coredump_progress
# Coredumps generated by a toolchain built mongodb can be problematic when examined with the system
# gdb.
-export PATH=/opt/mongodbtoolchain/v3/bin:$PATH
+export PATH=$PATH:/opt/mongodbtoolchain/v3/bin
# As per below, put the user into the appropriate directory. This is where gdb is expected to be
# invoked from.
cd debug
@@ -33,7 +33,7 @@ echo "To examine a core dump, type 'gdb ./<binary> ./<core file>'"
cat ~/.setup_spawnhost_coredump_progress
EOF
-export PATH=/opt/mongodbtoolchain/v3/bin:$PATH
+export PATH=$PATH:/opt/mongodbtoolchain/v3/bin
echo 'if [ -f ~/.profile ]; then
. ~/.profile
fi' >> .bash_profile
diff --git a/evergreen/hang_analyzer.sh b/evergreen/hang_analyzer.sh
index 980336c4d5d..ae39845798a 100644
--- a/evergreen/hang_analyzer.sh
+++ b/evergreen/hang_analyzer.sh
@@ -14,8 +14,8 @@ else
fi
activate_venv
-echo "Calling the hang analyzer: PATH=\"/opt/mongodbtoolchain/v3/bin:$PATH\" $python buildscripts/resmoke.py hang-analyzer $hang_analyzer_option"
-PATH="/opt/mongodbtoolchain/v3/bin:$PATH" $python buildscripts/resmoke.py hang-analyzer $hang_analyzer_option
+echo "Calling the hang analyzer: PATH=\"$PATH:/opt/mongodbtoolchain/v3/bin\" $python buildscripts/resmoke.py hang-analyzer $hang_analyzer_option"
+PATH="$PATH:/opt/mongodbtoolchain/v3/bin" $python buildscripts/resmoke.py hang-analyzer $hang_analyzer_option
# Call hang analyzer for tasks that are running remote mongo processes
if [ -n "${private_ip_address}" ]; then