Closed Bug 1315441 Opened 8 years ago Closed 8 years ago

KeyError: 'aws_instance_type' on OS X

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: aryx, Assigned: gps)

References

Details

Attachments

(1 file)

Bug 1315041 's call im['aws_instance_type'] fails on OS X:

https://treeherder.mozilla.org/logviewer.html#?job_id=6179040&repo=autoland

02:00:45     INFO - Running post-run listener: _resource_record_post_run
02:00:45  WARNING - error reading instance_metadata: Traceback (most recent call last):
02:00:45  WARNING -   File "/builds/slave/test/scripts/mozharness/base/python.py", line 519, in perfherder_resource_options
02:00:45  WARNING -     instance = im['aws_instance_type'].encode('ascii')
02:00:45  WARNING - KeyError: 'aws_instance_type'
Sometimes I really dislike Treeherder's overzealous desire to turn harmless warnings into something that looks bad.

Anyway, we're able to load /etc/instance_metadata.json on this machine. However, it doesn't have an "aws_instance_type" key. The plot is further thickened by https://hg.mozilla.org/build/puppet/file/79383527e18d/modules/instance_metadata/files/instance_metadata.py. AFAICT that is the only file that produces instance_metadata.json. And that script always writes out a "aws_instance_type" key.

I suspect some other process is producing instance_metadata.json on this machine class. But I have no idea where to look.

rail: could you please either point me in the direction of the code that produces instance_metadata.json on Macs or paste an example file so I know what data there is to extract?
Flags: needinfo?(rail)
Ahh, I missed the empty JSON file ("{}") in puppet. I'll update the mozharness Python to handle this case.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Comment on attachment 8808406 [details]
Bug 1315441 - Handle missing aws_instance_type key;

https://reviewboard.mozilla.org/r/91214/#review93492
Attachment #8808406 - Flags: review?(ted) → review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16568d2ed7cd
Handle missing aws_instance_type key; r=ted
https://hg.mozilla.org/mozilla-central/rev/16568d2ed7cd
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: