[SERVER-37489] Powercycle does not always fail with an ssh error Created: 05/Oct/18  Updated: 27/Oct/23  Resolved: 05/Nov/21

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

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Gone away Votes: 0
Labels: tig-powercycle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Participants:
Linked BF Score: 30

 Description   

There are still cases in powertest.py where an ssh error is not handled properly causing an exit with an ssh error code. The ssh error code is used to designate the failed task as a system failure and not a test failure.

        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)

The non-internal cases should check for ssh errors as well.


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