Elastic Bamboo switches to regular on-demand EC2 instances after the Spot instance fallback timeout has expired
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
要約
This article provides guidance on how to adjust the fallback timeout to a regular EC2 instance when using AWS Spot configuration and recommends an approach to finding a well-balanced setup that does not affect the delivery of build results.
環境
- Bamboo
- Elastic Agents
診断
You could observe the warning below inside the Support Zip:
[elastic-pool-2-thread-5] [RemoteEC2InstanceImpl] Spot request sir-kx86nj9h state is cancelled after 61 seconds, falling back to a regular instance.
The warning indicates that a request to create a Spot Instance (with request ID sir-kx86nj9h) was cancelled because it was not fulfilled within the expected time frame (in this case, 61 seconds), given that the spot request was not completed, the system tries to provision a regular (on-demand) EC2 instance as a fallback.
原因
Bamboo operates on a bidding basis for Spot instances, but does not take dynamic costs into account, and is subject to the time it takes for requests to update. If a transition from BIDDING to IDENTIFIED is not confirmed by AWS within the designated fallback period, Bamboo will automatically switch to a standard on-demand instance.
Users can configure Elastic Bamboo to buy a spot instance of a particular type and fall back to a regular instance after a set amount of time if no instances are available.
As described in:
In this case, the fallback time is 1 minute which is 60 seconds and Bamboo falls back to normal EC2 instance selection after 61 seconds.
ソリューション
To address the issue, follow the steps below:
- Navigate to Bamboo Configuration
- Select Spot Instances
- Adjust the "Fallback to a regular instance after" property value. It is advisable to increment the value in small amounts
- Monitor the creation of Bamboo's Elastic Agent after each adjustment
- Continue the adjustments until you achieve a configuration that is balanced and does not negatively impact your build results delivery.
An example of the configuration page is shown below: