LOGGER.info("Crash server or Kill mongod: %d %s****", ret, output)
|
|
# For internal crashes 'ret' is non-zero, because the ssh session unexpectedly terminates.
|
if options.crash_method != "internal" and ret:
|
raise Exception("Crash of server failed: {}".format(output))
|
|
if options.crash_method != "kill":
|
# Check if the crash failed due to an ssh error.
|
if options.crash_method == "internal" and local_ops.ssh_error(output):
|
ssh_failure_exit(ret, output)
|
# Wait a bit after sending command to crash the server to avoid connecting to the
|
# server before the actual crash occurs.
|
time.sleep(10)
|