-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Fully Compatible
-
ALL
-
v3.6
-
TIG 2018-04-09
-
0
The changes from 72ce569 as part of SERVER-33619 changed ssh_host = getattr(aws_status, address_type) to ssh_host = aws_status.address_type; however, the two forms are not equivalent. The former returns the attribute named by the address_type variable (or None if the attribute isn't present), whereas the latter returns attribute named "address_type". This issue only manifests when the EC2 instance failed to restart (e.g. a "Request limit exceeded" error from EC2) and doesn't regularly impact the powercycle testing Evergreen tasks.
[2018/03/20 16:46:02.752] 2018-03-20 16:46:02,752 INFO AWS EC2 instance status: 1 An error occurred (RequestLimitExceeded) when calling the DescribeInstances operation (reached max retries: 4): Request limit exceeded.**** [2018/03/20 16:46:03.146] 2018-03-20 16:46:03,146 INFO Start instance: 0 InstanceStatus(instance_id='i-03c9e785ddb6ddf07', image_id='ami-01bc767c', instance_type='c3.xlarge', state={u'Code': 16, u'Name': 'running'}, private_ip_address='10.122.6.166', public_ip_address='34.224.173.2', private_dns_name='ip-10-122-6-166.ec2.internal', public_dns_name='ec2-34-224-173-2.compute-1.amazonaws.com', tags=[{u'Value': 'ubuntu', u'Key': 'owner'}, {u'Value': 'AMI Evergreen mongodb_mongo_master_ubuntu1404_powercycle_patch_e0496b2fd2fd6938c9d0920df5ef1768cbbcc5db_5ab065a4e3c33148ba76761b_18_03_20_01_36_50', u'Key': 'Name'}, {u'Value': '2018-03-20 19:34:57', u'Key': 'expire-on'}])**** [2018/03/20 16:46:03.146] Traceback (most recent call last): [2018/03/20 16:46:03.146] File "pytests/powertest.py", line 2562, in <module> [2018/03/20 16:46:03.147] main() [2018/03/20 16:46:03.147] File "pytests/powertest.py", line 2538, in main [2018/03/20 16:46:03.147] ssh_host = aws_status.address_type [2018/03/20 16:46:03.431] AttributeError: 'InstanceStatus' object has no attribute 'address_type' [2018/03/20 16:46:03.431] Command failed: command [pid=2427] encountered problem: exit status 1 [2018/03/20 16:46:03.431] Task completed - FAILURE.
- is caused by
-
SERVER-33619 Assign address_type for any EC2 instance in powertest.py
- Closed