Closed Bug 1259399 Opened 9 years ago Closed 8 years ago

CloudTools intermittently copies wrong AMI from use1 to usw2 during golden ami creation process

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1152624

People

(Reporter: grenade, Unassigned)

Details

Attachments

(1 file)

Frequently during the golden AMI creation process, the wrong AMI is selected for copying from us-east-1 to us-west-2. This rarely causes problems because the selection filter usually picks the previous day's AMI (instead of the current day's). Which means that the damage is limited to creating builders with day-old puppet configuration. Two examples of the aws-manager logs showing incorrect AMI selection are attached. The filter is here: https://github.com/mozilla/build-cloud-tools/blob/master/cloudtools/scripts/aws_create_instance.py#L311 -- Where the selector is looking for the latest image.
Attachment #8734322 - Flags: feedback?(rail)
Looks like https://github.com/mozilla/build-cloud-tools/blob/600dcc1aa87a3c00921373c4f503e7cc44f05043/cloudtools/aws/ami.py#L75 is not enough to make sure AMI is ready to be copied, even though we use the same state filter when we select AMIs to copy: https://github.com/mozilla/build-cloud-tools/blob/600dcc1aa87a3c00921373c4f503e7cc44f05043/cloudtools/aws/ami.py#L102 and we check the status of the underlying snapshot in https://github.com/mozilla/build-cloud-tools/blob/600dcc1aa87a3c00921373c4f503e7cc44f05043/cloudtools/aws/ami.py#L44 Maybe we should get rid of multiprocessing in https://github.com/mozilla/build-cloud-tools/blob/master/cloudtools/scripts/aws_create_instance.py#L229, return AMI ID from make_instance() and explicitly use it (retrying on errors)?
Attachment #8734322 - Flags: feedback?(rail)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: