forked from LeanerCloud/AutoSpotting
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy EC2 tags to spot instances as early as possible.
Sometimes the user_data script relies EC2 tags, and also on the fact that new instances are already tagged by the time they are booting, in a way identical to all the instances from the AutoScaling group. Unfortunately EC2 tags are not part of the launch configuration, so they need to be manually copied to the new spot instances. Initially the EC2 tags were copied late in the replacement process, right before the instance was added to the group, which may have been too late for the user_data script, so the instances were added before they would be set up, or in the worst (but most common) scenario, they would not be set up at all in case the user_data script doesn't continuously poll the instance tags for what it actually expects. The instance replacement logic was changed so that the new spot instances are tagged as early as possiblei, by waiting for the request to be fulfilled and applying the tags immediately. Change-Id: If63dff0dbf2a6ea31944b32af8d530aa595a1fb5
- Loading branch information
Showing
2 changed files
with
175 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.