-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform on Bash on Ubuntu on Windows #6194
Comments
Hi @abosley! Thanks for opening an issue here. This is deep inside the Go runtime. Go is known to be problematic for system call translation - the experience of Joyent with Illumos LX zones shows that. This is not something we can fix in Terraform - it will require Microsoft to more accurately emulate Linux. Since this is currently preview software and way beyond our control, I'm going to close this issue for now - when there is a released version of Windows containing this functionality we can take another look. In the meantime, there are native Windows binaries for Terraform released - the last version dramatically improved support for Windows. |
I just found there is an "open" issue tracker for the system call translation on Windows - Terraform working seems to be contingent at least on this: We know there is nothing inherently in the Linux binaries for Terraform incapable of working with such systems in general, as it runs fine in an LX zone - so I think the solution here is to just wait and test again periodically. |
FYI, I downloaded Terraform version 0.7.4 of the Linux 64-bit for my bash on Ubuntu on Windows 10. I get this error with "resource aws_instance" with just terraform plan _Error configuring: 1 error(s) occurred:
|
I'm getting same issue with 0.7.7
|
This is likely due to bugs in Windows' Linux subsystem handling of UNIX domain sockets, which plugins use on platforms that are not Windows. |
Bump. I too am having issues getting this running. Glad I'm not the only one trying :-) |
Hi @liquidghondi - probably the MS forum for the Linux subsystem (if there is one) is the only place anyone can assist with this. As the SmartOS system call table replacement shows, there is nothing in principle that stops this working - the Windows implementation is simply not finished. |
Just found this issue as having Terraform 'problem' (not a problem). Then remembered I had this 'problem' a month ago and was on this page. Looking forward to Bash on Windows looking/working as well as/better than Cygwin in the near future so we can use tools like Terraform ftw, FTW! |
Just ran into this, not liking this bash implementation as much as I'd hoped. |
Still there with terraform 0.9.1 Here was the linux kernel info Too bad, would love for this to work. |
@panmanphil This is something you need to raise with Microsoft - their system call table implementation is not presenting correctly as Linux, otherwise this would work. |
yep, no doubt. I just tried this on a windows insider build, version 15063 (stable ring). It works! Mileage may vary of course on a larger build with more resources, but a quick sample with a few s3 buckets worked about the same as on my mac. |
Seems to be working OK in the final official 'Creators Update' released recently. The only issue I have is that terraform sometimes takes a long time (10+ seconds) to return to the bash prompt after seemingly finishing its activities. |
My guess is this is related to one of two things: writing the state to disk (less likely) or something around the fork/exec that both provider plugins (in combination with domain sockets) and panicwrap use extensively. However, it sounds like good progress is being made, and this will eventually work correctly! |
I was able to use it on a pretty large configuration with hundreds of resources and only ran into problems with some remote-exec ansible operations that requires some more tweaking. That used remote state so always has some delay at the end, |
Just finished installing on Creators update using Ubuntu 16.04, so far so good. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
As an experiment, I attempted to run the Linux version of 0.6.14 on Bash on Ubuntu on Windows - a beta feature on Windows 10. Running terraform -v generates the following error:
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0xfb3ab0, 0x9)
/opt/go/src/runtime/panic.go:530 +0x90
runtime.newosproc(0xc820026000, 0xc820035fc0)
/opt/go/src/runtime/os1_linux.go:149 +0x18c
runtime.newm(0x11a0d80, 0x0)
/opt/go/src/runtime/proc.go:1513 +0x135
runtime.main.func1()
/opt/go/src/runtime/proc.go:125 +0x2c
runtime.systemstack(0x1547800)
/opt/go/src/runtime/asm_amd64.s:291 +0x79
runtime.mstart()
/opt/go/src/runtime/proc.go:1048
goroutine 1 [running]:
runtime.systemstack_switch()
/opt/go/src/runtime/asm_amd64.s:245 fp=0xc820020770 sp=0xc820020768
runtime.main()
/opt/go/src/runtime/proc.go:126 +0x62 fp=0xc8200207c0 sp=0xc820020770
runtime.goexit()
/opt/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8200207c8 sp=0xc8200207c0
The text was updated successfully, but these errors were encountered: