Closed memes closed 2 years ago
Additional information:
terraform version; uname -a
Terraform v1.0.11
on darwin_amd64
+ provider registry.terraform.io/hashicorp/google v3.90.1
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
Darwin REDACTED 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64
terraform version
Terraform v1.0.11
on windows_amd64
+ provider registry.terraform.io/hashicorp/google v3.90.1
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
ver
Microsoft Windows [Version 10.0.19043.1320]
PR #10 is a proposed solution to the issue that removes all \r characters from the rendered onboarding script.
I've been troubleshooting a customer deployment, and the root-cause appears to be the way the startup-script is rendered on Windows systems. The startup-script fails to execute in the VM launched by Windows, with serial output ending at
mcpd has reached 'running' state
(see win-1nic-9dd5-f5vm01.serial.log) but the exact same example Terraform files when executed on macOS succeeds (see mac-1nic-826e-f5vm01.serial.log).Examining the generated startup-scripts, it looks like the Windows module renders the shell script with \n\r line endings, instead of \n, breaking the onboarding process.
Reproducing using 1nic example
Create a new 1NIC from published example, patch to use module from registry (see bugreport.patch.txt) on macOS and Windows
Create a
terraform.tfvars
fileApply
Compare serial port output of VM launched from macOS with serial port output of VM launched from Windows