This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 1243cdd97c Fail ARM image preparation when instance cannot be started
(#30846)
1243cdd97c is described below
commit 1243cdd97c4313ccd3be94beb599beaa0d81b6e6
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Apr 24 21:33:18 2023 +0200
Fail ARM image preparation when instance cannot be started (#30846)
When an ARM instance cannot be started - because most likely, the
request cannot be fulfilled, we fail the job. This is better than
trying to run in emulation mode
Increase back instance size as the new one was too small.
---
scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh
b/scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh
index d10e8c7766..6fcd62a20c 100755
--- a/scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh
+++ b/scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh
@@ -20,7 +20,7 @@ SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
WORKING_DIR="/tmp/armdocker"
INSTANCE_INFO="${WORKING_DIR}/instance_info.json"
ARM_AMI="ami-0e43196369d299715" # AMI ID of latest arm-docker-ami-v*
-INSTANCE_TYPE="m6g.xlarge" # m6g.xlarge -> 4 vCPUS 16 GB RAM
+INSTANCE_TYPE="m6g.2xlarge" # m6g.2xlarge -> 8 vCPUS 32 GB RAM
MARKET_OPTIONS="MarketType=spot,SpotOptions={MaxPrice=0.25,SpotInstanceType=one-time}"
REGION="us-east-2"
EC2_USER="ec2-user"
@@ -45,6 +45,10 @@ function start_arm_instance() {
> "${INSTANCE_INFO}"
INSTANCE_ID=$(jq < "${INSTANCE_INFO}" ".Instances[0].InstanceId" -r)
+ if [[ ${INSTANCE_ID} == "" ]]; then
+ echo "ERROR!!!! Failed to start ARM instance. Likely because it could
not be allocated on spot market."
+ exit 1
+ fi
AVAILABILITY_ZONE=$(jq < "${INSTANCE_INFO}"
".Instances[0].Placement.AvailabilityZone" -r)
aws ec2 wait instance-status-ok --instance-ids "${INSTANCE_ID}"
INSTANCE_PRIVATE_DNS_NAME=$(aws ec2 describe-instances \