[SERVER-33682] Python virtualenv not setup in "Gather remote mongo coredumps" post phase in evergreen.yml Created: 05/Mar/18  Updated: 29/Oct/23  Resolved: 06/Mar/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.6.4, 3.7.3

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Jonathan Abrahams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: TIG 2018-03-12
Participants:

 Description   

For each command: shell.exec that uses $python there needs to be the command ${activate_virtualenv}. This is missing in the post phase in 2 places:

  # Gather remote mongo coredumps.
  - command: shell.exec
    params:
      working_dir: "src"
      script: |
        if [ ! -f ${aws_ec2_yml|""} ]; then
          exit 0
        fi
        ssh_connection_options="${ssh_identity} ${ssh_connection_options}"
        remote_dir=${remote_dir|.}
        # Find all core files and move to $remote_dir
        cmds="core_files=\$(/usr/bin/find -H . \( -name '*.core' -o -name '*.mdmp' \) 2> /dev/null)"
        cmds="$cmds; if [ -z \"\$core_files\" ]; then exit 0; fi"
        cmds="$cmds; echo Found remote core files \$core_files, moving to \$(pwd)"
        cmds="$cmds; for core_file in \$core_files"
        cmds="$cmds; do base_name=\$(echo \$core_file | sed 's/.*\///')"
        cmds="$cmds;   if [ ! -f \$base_name ]; then mv \$core_file .; fi"
        cmds="$cmds; done"
        $python buildscripts/remote_operations.py \
          --verbose                                        \
          --userHost $USER@${ip_address}                   \
          --sshConnectionOptions "$ssh_connection_options" \
          --retries ${ssh_retries}                         \
          --commands "$cmds"                               \
          --commandDir $remote_dir
  - command: shell.exec
    params:
      working_dir: "src"
      script: |
        if [ ! -f ${aws_ec2_yml|""} ]; then
          exit 0
        fi
        ssh_connection_options="${ssh_identity} ${ssh_connection_options}"
        remote_dir=${remote_dir|.}
        $python buildscripts/remote_operations.py \
          --verbose                                        \
          --userHost $USER@${ip_address}                   \
          --operation "copy_from"                          \
          --sshConnectionOptions "$ssh_connection_options" \
          --retries ${ssh_retries}                         \
          --file "$remote_dir/*.core"                      \
          --file "$remote_dir/*.mdmp"
        # Since both type of core files do not exist on the same host, this command
        # will always return non-zero. As the core file retrieval is optional, we
        # always exit successfully.
        exit 0



 Comments   
Comment by Githook User [ 06/Mar/18 ]

Author:

{'email': 'jonathan@mongodb.com', 'name': 'Jonathan Abrahams', 'username': 'hptabster'}

Message: SERVER-33682 Python virtualenv not setup in "Gather remote mongo coredumps" post phase in evergreen.yml

(cherry picked from commit 80625c63d47a1d9306958d7ea95154d12c10cade)
Branch: v3.6
https://github.com/mongodb/mongo/commit/502d2043ded57fac08bffc1620f94de45cdf1cd8

Comment by Githook User [ 06/Mar/18 ]

Author:

{'email': 'jonathan@mongodb.com', 'name': 'Jonathan Abrahams', 'username': 'hptabster'}

Message: SERVER-33682 Python virtualenv not setup in "Gather remote mongo coredumps" post phase in evergreen.yml
Branch: master
https://github.com/mongodb/mongo/commit/80625c63d47a1d9306958d7ea95154d12c10cade

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