[SERVER-33619] Assign address_type for any EC2 instance in powertest.py Created: 02/Mar/18  Updated: 29/Oct/23  Resolved: 05/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: tig-powercycle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
causes SERVER-34062 powertest.py attempts to access an at... Closed
is caused by SERVER-31682 Support AWS EC2 stop in powercycle tests Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: TIG 2018-03-12
Participants:
Linked BF Score: 28

 Description   

We need ensure that address_type is assigned before accessing this code block:

        if options.crash_method == "aws_ec2" or not instance_running:
            ret, aws_status = ec2.control_instance(
                mode="start", image_id=options.instance_id, wait_time_secs=600, show_progress=True)
            LOGGER.info("Start instance: %d %s****", ret, aws_status)
            if ret:
                raise Exception("Start instance failed: {}".format(aws_status))
            if not hasattr(aws_status, address_type):
                raise Exception("Cannot determine address_type {} from AWS EC2 status {}".format(
                    address_type, aws_status))



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

Author:

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

Message: SERVER-33619 Assign address_type for any EC2 instance in powertest.py

(cherry picked from commit 72ce569dd87b2eaf9d0a04ccb4c373037fd59fd4)
Branch: v3.6
https://github.com/mongodb/mongo/commit/8c6e0a4c1b93f3dbe272aaf2ae9d971e4c18e302

Comment by Githook User [ 05/Mar/18 ]

Author:

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

Message: SERVER-33619 Assign address_type for any EC2 instance in powertest.py
Branch: master
https://github.com/mongodb/mongo/commit/72ce569dd87b2eaf9d0a04ccb4c373037fd59fd4

Comment by Jonathan Abrahams [ 05/Mar/18 ]

Code review: http://mongodbcr.appspot.com/191370001
Evergreen: https://evergreen.mongodb.com/version/5a9c736ae3c33154d9f0bb4f
Evergreen with not bypassing compile: https://evergreen.mongodb.com/version/5a9d5fabe3c33154d9f0bfe6

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