Skip to content

Commit

Permalink
Add troubleshooting docs on ICL_TERRAFORM_DISABLE_LOCKING (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasd authored Jun 5, 2024
1 parent 3924ba5 commit f73e806
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -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
```
2 changes: 1 addition & 1 deletion scripts/deploy/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[*]}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/gke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f73e806

Please sign in to comment.