tfutils / tfenv

Terraform version manager
MIT License
4.51k stars 454 forks source link

Terragrunt run-all plan failing with exec.ExitError exit status 126. #414

Open nishilampally opened 10 months ago

nishilampally commented 10 months ago

Recently we have implemented tfenv and tgenv to manage multiple versions of terraform and terragrunt . When I try to run terragrunt run-all plan I'm getting a 126 error exit code. I've enabled debug logging and it's not very helpful. The issue is intermittent where run--all plan get succeeds sometimes and fails intermittently. User(AzDevOps) has execute permissions on both terraform and terragrunt. I am not sure why I am getting this error. There is not much information available from the logs.

Setup: Ubuntu machine 20_04-lts

Command: terragrunt run-all plan --terragrunt-source-update -no-color --terragrunt-include-external-dependencies

Permissions:

drwxr-xr-x 3 root root 4096 Sep 20 16:48 aws-cli drwxr-xr-x 3 root root 4096 Sep 20 16:48 bin drwxr-xr-x 2 root root 4096 Aug 31 21:39 etc drwxr-xr-x 2 root root 4096 Aug 31 21:39 games drwxr-xr-x 2 root root 4096 Aug 31 21:39 include drwxr-xr-x 3 root root 4096 Aug 31 21:39 lib lrwxrwxrwx 1 root root 9 Aug 31 21:39 man -> share/man drwxr-xr-x 2 root root 4096 Aug 31 21:39 sbin drwxr-xr-x 5 root root 4096 Sep 20 16:44 share drwxr-xr-x 2 root root 4096 Aug 31 21:39 src drwxrwxrwx 10 root root 4096 Sep 20 16:46 tfenv drwxrwxrwx 9 root root 4096 Sep 20 16:46 tgenv /agent/_work/1/s total 60

total 44 -rwxrwxrwx 1 root root 304 Sep 20 16:46 CHANGELOG.md -rwxrwxrwx 1 root root 1086 Sep 20 16:46 LICENSE -rwxrwxrwx 1 root root 5440 Sep 20 16:46 README.md drwxrwxrwx 2 root root 4096 Sep 20 16:46 assets drwxrwxrwx 2 root root 4096 Sep 20 16:46 bin drwxrwxrwx 2 root root 4096 Sep 20 16:46 libexec -rwxrwxrwx 1 root root 1165 Sep 20 16:46 list_all_versions_offline drwxrwxrwx 2 root root 4096 Sep 20 16:46 test -rwxrwxrwx 1 root root 7 Sep 20 16:46 version drwxrwxrwx 4 root root 4096 Oct 19 19:41 versions /agent/_work/1/s total 8 drwxr-xr-x 2 AzDevOps AzDevOps 4096 Oct 19 19:42 1.0.1 drwxrwxrwx 2 root root 4096 Sep 20 16:46 1.5.5 total 8 drwxr-xr-x 2 AzDevOps AzDevOps 4096 Oct 19 19:41 0.37.1 drwxrwxrwx 2 root root 4096 Sep 20 16:46 0.49.1 /agent/_work/1/s total 78812 -rwxr-xr-x 1 AzDevOps AzDevOps 80702103 Jun 24 2021 terraform total 35700 -rwxr-xr-x 1 AzDevOps AzDevOps 36554016 Oct 19 19:41 terragrunt /agent/_work/1/s -rwxr-xr-x 1 AzDevOps AzDevOps 80702103 Jun 24 2021 /usr/local/tfenv/versions/1.0.1/terraform -rwxr-xr-x 1 AzDevOps AzDevOps 36554016 Oct 19 19:41 /usr/local/tgenv/versions/0.37.1/terragrunt

Error:

time=2023-11-06T03:03:51Z level=error msg=169 errors occurred:

iokiwi commented 9 months ago

Note that a similar issue has been raised for tgenv/tgenv here https://github.com/tgenv/tgenv/issues/27