TritonDataCenter / terraform-provider-triton

Terraform Joyent Triton provider
https://www.terraform.io/docs/providers/triton/
Mozilla Public License 2.0
15 stars 24 forks source link

Crash during destroy. #64

Closed clstokes closed 6 years ago

clstokes commented 6 years ago

During a destroy I experienced a crash. I was destroying 200 machines and the crash happened at the very end. Interestingly, when I re-ran the destroy it completed immediately with no machines leftover from when the crash occurred. I double-checked and indeed all machines had been destroyed.

Terraform Version

$ terraform version
Terraform v0.11.1
+ provider.triton v0.3.0

Affected Resource(s)

Terraform Configuration Files

data "triton_image" "ubuntu" {
  name        = "ubuntu-16.04"
  type        = "lx-dataset"
  most_recent = true
}

resource "triton_machine" "bastion" {
  count = "${var.bastion_machine_count}"

  name    = "bastion-${count.index}"
  package = "g4-general-8G"
  image   = "${data.triton_image.ubuntu.id}"

  tags {
    role = "bastion"
  }

  cns {
    services = ["bastion"]
  }
}

Output

https://gist.github.com/clstokes/9bbac5320a687fcd3c23aa3056ae8608#file-_tf-log

Panic Output

https://gist.github.com/clstokes/9bbac5320a687fcd3c23aa3056ae8608#file-crash-log

Expected Behavior

Destroy should have completed successfully.

Actual Behavior

Terraform crashed.

Steps to Reproduce

Apply and then destroy. I don't think this will be easily reproducible though.

clstokes commented 6 years ago

Another crash - different part of code, but I think same general issue - crash on EOF.

https://gist.github.com/clstokes/35dcedbb3188edd06305a908ee06472e#file-_tf-log

clstokes commented 6 years ago

Oh... able to reproduce the one from my last comment relatively easier. Block the the Triton provider executable from accessing the network (using Tripmode or something similar) and you'll get the EOF.

clstokes commented 6 years ago

Still getting a similar error with Triton provider 0.4.0.

https://gist.github.com/clstokes/587ea4ddc5f75c12ef0670577d3dfb3a