From f73e806da1dfb26a1e1e18fe77d9e6e935d18bed Mon Sep 17 00:00:00 2001 From: Vadim Musin Date: Wed, 5 Jun 2024 19:48:46 +0200 Subject: [PATCH] Add troubleshooting docs on ICL_TERRAFORM_DISABLE_LOCKING (#17) --- docs/troubleshooting.md | 9 +++++++++ scripts/deploy/aws.sh | 2 +- scripts/deploy/gke.sh | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 docs/troubleshooting.md diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 0000000..0e0277d --- /dev/null +++ b/docs/troubleshooting.md @@ -0,0 +1,9 @@ +# Troubleshooting + +## Terraform locking +In case you have your deployment script interrupted, you may have the "Error: Error locking state: Error acquiring the state lock" message. +To disable Terraform locking, export the following variable. This has to be done once. After rerunning the deploy script, the lock will be released. + +```shell +export ICL_TERRAFORM_DISABLE_LOCKING=1 +``` diff --git a/scripts/deploy/aws.sh b/scripts/deploy/aws.sh index f9a152e..11d0ba9 100755 --- a/scripts/deploy/aws.sh +++ b/scripts/deploy/aws.sh @@ -71,7 +71,7 @@ function eks_terraform_args() -var gpu_type="${GPU_TYPE}" -var instance_type="${ICL_AWS_INSTANCE_TYPE}" ) - if [[ -v X1_TERRAFORM_DISABLE_LOCKING ]]; then + if [[ -v X1_TERRAFORM_DISABLE_LOCKING || -v ICL_TERRAFORM_DISABLE_LOCKING ]]; then terraform_extra_args+=( -lock=false ) fi echo "${terraform_extra_args[*]}" diff --git a/scripts/deploy/gke.sh b/scripts/deploy/gke.sh index 9761a60..f2c60f9 100755 --- a/scripts/deploy/gke.sh +++ b/scripts/deploy/gke.sh @@ -93,7 +93,7 @@ function x1_terraform_args() { -var use_node_ip_for_user_ports=true -var use_external_node_ip_for_user_ports=true ) - if [[ -v X1_TERRAFORM_DISABLE_LOCKING ]]; then + if [[ -v X1_TERRAFORM_DISABLE_LOCKING || -v ICL_TERRAFORM_DISABLE_LOCKING ]]; then terraform_extra_args+=( -lock=false ) fi # TODO: add lock release here