Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-33682

Python virtualenv not setup in "Gather remote mongo coredumps" post phase in evergreen.yml

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.4, 3.7.3
    • Testing Infrastructure
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • TIG 2018-03-12

    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
      

      Attachments

        Activity

          People

            jonathan.abrahams Jonathan Abrahams
            jonathan.abrahams Jonathan Abrahams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: