[SERVER-34062] powertest.py attempts to access an attribute named address_type rather than its value Created: 22/Mar/18  Updated: 29/Oct/23  Resolved: 23/Mar/18

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

Type: Bug Priority: Minor - P4
Reporter: Max Hirschhorn 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
Problem/Incident
is caused by SERVER-33619 Assign address_type for any EC2 insta... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: TIG 2018-04-09
Participants:
Linked BF Score: 0

 Description   

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.

https://evergreen.mongodb.com/task/mongodb_mongo_master_ubuntu1404_powercycle_patch_e0496b2fd2fd6938c9d0920df5ef1768cbbcc5db_5ab065a4e3c33148ba76761b_18_03_20_01_36_50/0



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

Author:

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

Message: SERVER-34062 powertest.py attempts to access an attribute named address_type rather than its value

(cherry picked from commit d91abcb54e4b867d33cc2faacd4087f04feb1b01)
Branch: v3.6
https://github.com/mongodb/mongo/commit/d4ad537e536076938c8b178eb41eba3f94f6266c

Comment by Githook User [ 23/Mar/18 ]

Author:

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

Message: SERVER-34062 powertest.py attempts to access an attribute named address_type rather than its value
Branch: master
https://github.com/mongodb/mongo/commit/d91abcb54e4b867d33cc2faacd4087f04feb1b01

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