Closed tbpoetke closed 4 years ago
Hi @Aschenbecher Are you able to let us know which other providers and versions you mention are working?
Hello @jackofallops We are using the same setup with AWS and Oracle. And it was also working with azurem v1.x. Same configuration is also working on my local System. For debugging I changed the Docker image from Node to Ubuntu, same Error. And I never saw terraform crashing before....
Hi @Aschenbecher I appreciate that; the providers are all quite different, and move at difference cadences with libraries, SDK's etc. If you can let us know which versions of the providers you're using it this way I can look into the differences and try to track down if there's something we've changed or updated that the others haven't (or vice versa).
As an aside - do you have the container RAM constrained? If so, does the same problem occur if you increase the available memory? (signal SIGBUS: bus error code=0x2
suggests an issue with memory access)
Hello @jackofallops , Thanks for your fast reply! Oracle provider Version: 3.72 AWS Provider: 2.61
I will double check the memory, but I'm sure I did it already and I dont changed the Host Server, but I will recheck it!
@jackofallops I just upgraded the Server instance from A2_v2 to A8_v2, still the same problem. Since A8_v2 has 16 GB of memory, this should not be the problem.....
@jackofallops I just upgraded the Server instance from A2_v2 to A8_v2, still the same problem. Since A8_v2 has 16 GB of memory, this should not be the problem.....
I meant memory for the container itself, not the host - sorry for the confusion. I've done some testing of various versions of terraform and the AzureRM provider and not managed to recreate your issue. I can't comment or assist with your Docker configuration, but that's where I'd start. Do you get the same outcome on Docker on your local machine? (It may help to make use of https://hub.docker.com/r/hashicorp/terraform/)
@jackofallops Thanks for pointing me to this, I tested the same docker container locally and its working, maybe something with the our Azure network is broken since my upgrade of the terraform files to V2.x.... I will review the code upgrade of the azure terraform files tomorrow and try to find the problem...
Happy to help - I'm going to close this issue for now, but if you do find something awry with the provider please do let us know. Thanks!
I will also add the beginning of the logs now:
the local version:
Acquiring state lock. This may take a few moments...
var.environment
Enter a value: testing
var.num_servers
Enter a value: 1
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.terraform_remote_state.network: Refreshing state...
data.azurerm_resource_group.metabuild: Refreshing state...
data.azurerm_image.optimizerimage: Refreshing state...
data.azurerm_image.simimage: Refreshing state...
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# azurerm_linux_virtual_machine.optimizer will be created
+ resource "azurerm_linux_virtual_machine" "optimizer" {
+ admin_password = (sensitive value)
+ admin_username = "lisa"
+ allow_extension_operations = true
The server version which crashes:
var.environment
Enter a value: testing
var.num_servers
Enter a value: 1
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.terraform_remote_state.network: Refreshing state...
data.azurerm_resource_group.metabuild: Refreshing state...
data.azurerm_image.simimage: Refreshing state...
data.azurerm_image.optimizerimage: Refreshing state...
------------------------------------------------------------------------
Error: Unrecognized remote plugin message:
This usually means that the plugin is either invalid or simply
needs to be recompiled to support the latest protocol.
fatal error: fault
2020-06-17T14:37:43.580Z [DEBUG] plugin.terraform-provider-azurerm_v2.14.0_x5: [signal SIGBUS: bus error code=0x2 addr=0x360a7c0 pc=0x360a7c0]
2020-06-17T14:37:43.580Z [DEBUG] plugin.terraform-provider-azurerm_v2.14.0_x5:
Do you know what is terraform trying to acces next after refreshing the statefiles?
@jackofallops Sorry, I reopened it accidently, because I was already writing my last post :(
Sorry, I reopened it accidently, because I was already writing my last post :(
Not a problem. Terraform lists the items in the state and instantiates the provider plugins to do refresh its view of the world. I suspect your container is being bound on memory in some manner preventing the plugin doing so.
@jackofallops Hello Steve, after alot of debugging I found the problem which causes the problem. In the initial issue post I forgot one important information: the Terraform files are on a Azure SMB share. I didnt cared about it, because we used it already before without any problems. I can reproduce it when I copy the terraform files to my own NAS with smb, Terraform with the new Azure module will crash. I also tested it with the same setting with another provider (oracle) and I have no crashes. I was looking in terraform git issues for this problem and I found this: https://github.com/hashicorp/terraform/issues/17115 Hopefully this will help to fix this issue, because for our deployment it would be much better to use the SMB . Edit: Also docker doesnt matter, all test Im doing now, are without docker, its just the smb!
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Community Note
Terraform (and AzureRM Provider) Version
Terraform 0.12.20 - 0.12.26 azurerm plugin 2.x (2.13 & 2.14)
Affected Resource(s)
azurerm_linux_virtual_machine
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
We are using Terraform in a docker container. It was working with azurerm plugin Version 1.x. Since upgrading to Version 2.x its throwing the error above. With other provider its still working. On a localmachine with the same Terraform files its working, just happens inside of the docker container
Actual Behavior
terraform already crashing while Terraform plan or Terraform validate
Steps to Reproduce
2 Start Container:
terraform init
terraform apply
Important Factoids
It's just happening inside of Docker. Running on a local machine with exact the same files working like suposed to
References
it looks similiar like this :
15756