diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2019-05-27 08:56:11 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2019-05-27 08:56:11 -0400 |
commit | cf57e33764ba12a6a30ba6b75ef2aa3ccc192a78 (patch) | |
tree | fe09a69d689b0ad0f8fc1396c2049eb67905fb6c | |
parent | 24982c2fc634dcb5d033087f59614005f080f288 (diff) | |
download | mongo-cf57e33764ba12a6a30ba6b75ef2aa3ccc192a78.tar.gz |
SERVER-41169 Add powercycle Evergreen tasks to SSL Ubuntu 16.04 builder.r4.1.12
-rw-r--r-- | etc/evergreen.yml | 14 | ||||
-rwxr-xr-x | pytests/powertest.py | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml index a039b667a16..ce16e66780a 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -2390,7 +2390,10 @@ functions: cmds="$cmds; fi" cmds="$cmds; else echo Cannot change the core pattern and no core dumps will be generated." cmds="$cmds; fi" - cmds="$cmds; $sudo reboot" + # The following line for restarting the machine is based on + # https://unix.stackexchange.com/a/349558 in order to ensure the ssh client gets a + # response from the remote machine before it restarts. + cmds="$cmds; nohup $sudo reboot &>/dev/null & exit" ssh_connection_options="${ssh_identity} ${ssh_connection_options}" ${activate_virtualenv} $python buildscripts/remote_operations.py \ @@ -8269,6 +8272,15 @@ buildvariants: - name: .jstestfuzz .common - name: .logical_session_cache .one_sec - name: multiversion + - name: .powercycle + distros: + - ubuntu1604-powercycle + - name: powercycle_replication_smalloplog + distros: + - ubuntu1604-powercycle + - name: powercycle_write_concern_majority + distros: + - ubuntu1604-powercycle - name: replica_sets - name: watchdog_wiredtiger - name: .replica_sets .common diff --git a/pytests/powertest.py b/pytests/powertest.py index d1fcc29f499..f330a645a3b 100755 --- a/pytests/powertest.py +++ b/pytests/powertest.py @@ -772,7 +772,10 @@ class ProcessControl(object): """Return a list of 'proc' for the associated pids.""" procs = [] for pid in self.get_pids(): - procs.append(psutil.Process(pid)) + try: + procs.append(psutil.Process(pid)) + except psutil.NoSuchProcess: + pass return procs def is_running(self): |