Skip to content
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

Provider wants to modify host after apply #47

Closed
f0rkz opened this issue May 14, 2019 · 13 comments
Closed

Provider wants to modify host after apply #47

f0rkz opened this issue May 14, 2019 · 13 comments

Comments

@f0rkz
Copy link
Contributor

f0rkz commented May 14, 2019

Here is my sample terraform code

provider "proxmox" {
  pm_tls_insecure = true
  pm_api_url      = "https://REDACTED:8006/api2/json"
  pm_user         = "root@pam"
  pm_password     = "REDACTED"
}

resource "proxmox_vm_qemu" "cloudinit-test" {
  name        = "testing-tf.f0rkznet.net"
  desc        = "testing terraform proxmox plugin"
  target_node = "pve"
  clone       = "VM 9000"
  cores       = 2
  sockets     = 1
  memory      = 2048

  ipconfig0 = "gw=10.240.0.1,ip=10.240.0.15/22"
  ssh_user  = "ubuntu"

  sshkeys = <<EOF
ssh-rsa REDACTED f0rkz@github
ssh-rsa REDACTED terraform@terraform.io
EOF

  network {
    id     = 0
    model  = "virtio"
    bridge = "vmbr1"
  }

  disk {
    id           = 0
    type         = "scsi"
    storage      = "local-zfs"
    storage_type = "zfspool"
    size         = "100"
    format       = "raw"
  }

  provisioner "chef" {
    connection {
      type        = "ssh"
      user        = "ubuntu"
      private_key = "${file("./terraform_rsa")}"
    }

    environment     = "_default"
    run_list        = ["role[base]"]
    node_name       = "testing-tf.f0rkznet.net"
    server_url      = "https://REDACTED/organizations/f0rkznet"
    recreate_client = true
    user_name       = "f0rkz"
    user_key        = "${file("~/.chef/f0rkz.pem")}"
    ssl_verify_mode = ":verify_none"
  }
}

After an apply the following values fail to populate in the state file:

$ terraform plan
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.

proxmox_vm_qemu.cloudinit-test: Refreshing state... (ID: pve/qemu/106)

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ proxmox_vm_qemu.cloudinit-test
      network.2150516029.bridge:    "" => "vmbr1"
      network.2150516029.firewall:  "" => "false"
      network.2150516029.id:        "" => "0"
      network.2150516029.link_down: "" => "false"
      network.2150516029.macaddr:   "" => ""
      network.2150516029.model:     "" => "virtio"
      network.2150516029.queues:    "" => "-1"
      network.2150516029.rate:      "" => "-1"
      network.2150516029.tag:       "" => "-1"
      network.821959515.bridge:     "vmbr1" => ""
      network.821959515.firewall:   "false" => "false"
      network.821959515.id:         "0" => "0"
      network.821959515.link_down:  "false" => "false"
      network.821959515.macaddr:    "A2:19:BC:02:27:B1" => "A2:19:BC:02:27:B1"
      network.821959515.model:      "virtio" => ""
      network.821959515.queues:     "-1" => "0"
      network.821959515.rate:       "-1" => "0"
      network.821959515.tag:        "-1" => "0"
      qemu_os:                      "other" => "l26"


Plan: 0 to add, 1 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.

It seems that terraform wants to create a new network device because the old one wasn't stored?

When a apply is done, it fails:

$ terraform apply
proxmox_vm_qemu.cloudinit-test: Refreshing state... (ID: pve/qemu/106)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ proxmox_vm_qemu.cloudinit-test
      network.2150516029.bridge:    "" => "vmbr1"
      network.2150516029.firewall:  "" => "false"
      network.2150516029.id:        "" => "0"
      network.2150516029.link_down: "" => "false"
      network.2150516029.macaddr:   "" => ""
      network.2150516029.model:     "" => "virtio"
      network.2150516029.queues:    "" => "-1"
      network.2150516029.rate:      "" => "-1"
      network.2150516029.tag:       "" => "-1"
      network.821959515.bridge:     "vmbr1" => ""
      network.821959515.firewall:   "false" => "false"
      network.821959515.id:         "0" => "0"
      network.821959515.link_down:  "false" => "false"
      network.821959515.macaddr:    "A2:19:BC:02:27:B1" => "A2:19:BC:02:27:B1"
      network.821959515.model:      "virtio" => ""
      network.821959515.queues:     "-1" => "0"
      network.821959515.rate:       "-1" => "0"
      network.821959515.tag:        "-1" => "0"
      qemu_os:                      "other" => "l26"


Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

proxmox_vm_qemu.cloudinit-test: Modifying... (ID: pve/qemu/106)
  network.2150516029.bridge:    "" => "vmbr1"
  network.2150516029.firewall:  "" => "false"
  network.2150516029.id:        "" => "0"
  network.2150516029.link_down: "" => "false"
  network.2150516029.macaddr:   "" => ""
  network.2150516029.model:     "" => "virtio"
  network.2150516029.queues:    "" => "-1"
  network.2150516029.rate:      "" => "-1"
  network.2150516029.tag:       "" => "-1"
  network.821959515.bridge:     "vmbr1" => ""
  network.821959515.firewall:   "false" => "false"
  network.821959515.id:         "0" => "0"
  network.821959515.link_down:  "false" => "false"
  network.821959515.macaddr:    "A2:19:BC:02:27:B1" => "A2:19:BC:02:27:B1"
  network.821959515.model:      "virtio" => ""
  network.821959515.queues:     "-1" => "0"
  network.821959515.rate:       "-1" => "0"
  network.821959515.tag:        "-1" => "0"
  qemu_os:                      "other" => "l26"

Error: Error applying plan:

1 error(s) occurred:

* proxmox_vm_qemu.cloudinit-test: 1 error(s) occurred:

* proxmox_vm_qemu.cloudinit-test: 400 Parameter verification failed.

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
@f0rkz
Copy link
Contributor Author

f0rkz commented May 14, 2019

Confirmed it with another proxmox host:

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
$ terraform plan
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.

proxmox_vm_qemu.test-node: Refreshing state... (ID: pve/qemu/115)

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ proxmox_vm_qemu.test-node
      network.1156481209.bridge:    "vmbr0" => ""
      network.1156481209.firewall:  "false" => "false"
      network.1156481209.id:        "0" => "0"
      network.1156481209.link_down: "false" => "false"
      network.1156481209.macaddr:   "B6:B8:6E:02:03:FB" => "B6:B8:6E:02:03:FB"
      network.1156481209.model:     "virtio" => ""
      network.1156481209.queues:    "-1" => "0"
      network.1156481209.rate:      "-1" => "0"
      network.1156481209.tag:       "101" => "0"
      network.664803394.bridge:     "" => "vmbr0"
      network.664803394.firewall:   "" => "false"
      network.664803394.id:         "" => "0"
      network.664803394.link_down:  "" => "false"
      network.664803394.macaddr:    "" => ""
      network.664803394.model:      "" => "virtio"
      network.664803394.queues:     "" => "-1"
      network.664803394.rate:       "" => "-1"
      network.664803394.tag:        "" => "101"
      qemu_os:                      "other" => "l26"


Plan: 0 to add, 1 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.

@f0rkz f0rkz changed the title Provider fails to populate state file Provider wants to modify host after apply May 14, 2019
@f0rkz
Copy link
Contributor Author

f0rkz commented May 17, 2019

Any ideas?

@f0rkz
Copy link
Contributor Author

f0rkz commented May 21, 2019

Bump. Trying to utilize this project in a proof of concept. Having a hard time with the bugs. Would love to contribute anything I can, but need some sort of support.

@winkelchri
Copy link
Contributor

I'm facing the same problem and looking into it. In my case this does not fails but results in a not responding VM in the end. Still struggeling with the terraform plugin workflow.

@f0rkz
Copy link
Contributor Author

f0rkz commented May 21, 2019

Let me know if you find anything. I thought it may have been the clone source VM having a network card but I ran into a lot of issues last night building the plugin. Now that (I think) we're past the bugs and crashes I am going to test this theory.

@winkelchri
Copy link
Contributor

After quite some debug messages, I'm still not at the point, were the current state is being confused.

A terraform plan results on a created VM in the same behaviour:

  ~ proxmox_vm_qemu.cloudinit-test
      network.3429117860.bridge:    "vmbr0" => ""
      network.3429117860.firewall:  "false" => "false"
      network.3429117860.id:        "0" => "0"
      network.3429117860.link_down: "false" => "false"
      network.3429117860.model:     "virtio" => ""
      network.3429117860.queues:    "-1" => "0"
      network.3429117860.rate:      "-1" => "0"
      network.3429117860.tag:       "2" => "0"
      network.3884306486.bridge:    "" => "vmbr0"
      network.3884306486.firewall:  "" => "false"
      network.3884306486.id:        "" => "0"
      network.3884306486.link_down: "" => "false"
      network.3884306486.model:     "" => "virtio"
      network.3884306486.queues:    "" => "-1"
      network.3884306486.rate:      "" => "-1"
      network.3884306486.tag:       "" => "2"

As I understand the structure correctly, the resourceVmQemuRead() function in resource_vm_qemu.go should be responsible for reading the state (terraform.tfstate on the local disk in my case).

Any SetId() call can modify the state but as far as I have seen, the only function which is being called is the resourceVmQemuRead() and the last state of its data also matches to the local state.

So - still I do have no clue, were the new state data is coming from. The new id (3884306486) of the network mapping is also not showing up within the logs in any of the state dictionaries.

Maybe I find some time for further investigation. Maybe I have to find a way to start a debugger in Go (currenlt, I'm just using log outputs for analysis)

@ggongaware
Copy link
Member

I've been digging into this. The ids seem to come from a hashing function (https://github.com/hashicorp/terraform/blob/master/helper/schema/set.go#L16) ... I'm starting to trace the Diff routines now too.

@ggongaware
Copy link
Member

Found the cause: leaving macaddr blank and letting proxmox autogenerate throws of the terraforms hashing of sub-schemas. The work around for now is to supply a macaddr. Need to see if there's a way to prevent auto-generated macaddr in a sub-schema from triggering a change plan.

@f0rkz
Copy link
Contributor Author

f0rkz commented May 22, 2019

That's great news!

@f0rkz
Copy link
Contributor Author

f0rkz commented May 22, 2019

Having some new problems, can't confirm everything is working properly.

Seems the provider is having some serious issues with the new agent api endpoints.

Error: Error applying plan:

1 error occurred:
        * proxmox_vm_qemu.netbox: 1 error occurred:
        * proxmox_vm_qemu.netbox: unexpected EOF





Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.


panic: interface conversion: interface {} is string, not float64
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: goroutine 68 [running]:
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc000155890, 0xc0004655c0, 0x0, 0x42b9cc, 0x1cfe540)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/Telmate/proxmox-api-go/proxmox/config_qemu.go:257 +0x1eaa
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/Telmate/terraform-provider-proxmox/proxmox.prepareDiskSize(0xc0004655c0, 0xc000155890, 0xc0003f35c0, 0x12, 0x1)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:663 +0x50
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc0000cd180, 0xef2d00, 0xc0001b82d0, 0xc0000cd180, 0x0)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:429 +0x12fc
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc0000f9500, 0xc0000b9ae0, 0xc0004e4b80, 0xef2d00, 0xc0001b82d0, 0xc00047d501, 0x0, 0xc00006ab00)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/hashicorp/terraform/helper/schema/resource.go:286 +0x3b4
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc0000f9580, 0xc0000b9a90, 0xc0000b9ae0, 0xc0004e4b80, 0xc0003f3020, 0xc000404900, 0x18)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/hashicorp/terraform/helper/schema/provider.go:285 +0x18f
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc0004e41c0, 0xc0004e4760, 0xc00031e050, 0x0, 0x0)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/hashicorp/terraform/plugin/resource_provider.go:530 +0x57
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: reflect.Value.call(0xc000080720, 0xc0000104a0, 0x13, 0x10fd806, 0x4, 0xc00006af18, 0x3, 0x3, 0xc0004205c0, 0x0, ...)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/reflect/value.go:447 +0x461
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: reflect.Value.Call(0xc000080720, 0xc0000104a0, 0x13, 0xc000424f18, 0x3, 0x3, 0x0, 0x0, 0x0)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/reflect/value.go:308 +0xa4
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: net/rpc.(*service).call(0xc000464bc0, 0xc000430370, 0xc0000aec10, 0xc0000aec20, 0xc00047cc80, 0xc0003fa220, 0xef3bc0, 0xc0004e4760, 0x16, 0xef3c00, ...)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: created by net/rpc.(*Server).ServeCodec
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/net/rpc/server.go:481 +0x42b
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalWriteState
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalIf
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalWriteState
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalWriteDiff
2019-05-22T03:46:06.484Z [DEBUG] plugin: plugin process exited: path=/home/f0rkz/.terraform.d/plugins/terraform-provider-proxmox
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalApplyPost
2019/05/22 03:46:06 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error occurred:
        * proxmox_vm_qemu.netbox: unexpected EOF

2019/05/22 03:46:06 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error occurred:
        * proxmox_vm_qemu.netbox: unexpected EOF

2019/05/22 03:46:06 [TRACE] [walkApply] Exiting eval tree: proxmox_vm_qemu.netbox
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "provisioner.chef (close)"
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "provider.proxmox (close)"
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "root"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-05-22T03:46:06.598Z [WARN ] plugin: error closing client during Kill: err="connection is shut down"
2019-05-22T03:46:06.599Z [DEBUG] plugin.terraform-provider-cloudflare_v1.14.0_x4: 2019/05/22 03:46:06 [ERR] plugin: plugin server: accept unix /tmp/plugin726065545: use of closed network connection
2019-05-22T03:46:06.599Z [DEBUG] plugin.terraform: chef-provisioner (internal) 2019/05/22 03:46:06 [ERR] plugin: plugin server: accept unix /tmp/plugin977573955: use of closed network connection
2019-05-22T03:46:06.599Z [DEBUG] plugin.terraform: chef-provisioner (internal) 2019/05/22 03:46:06 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-05-22T03:46:06.600Z [DEBUG] plugin: plugin process exited: path=/home/f0rkz/tf-f0rkznet-home/.terraform/plugins/linux_amd64/terraform-provider-cloudflare_v1.14.0_x4
2019-05-22T03:46:06.601Z [DEBUG] plugin: plugin process exited: path=/bin/terraform
panic: interface conversion: interface {} is string, not float64
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: goroutine 68 [running]:
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc000155890, 0xc0004655c0, 0x0, 0x42b9cc, 0x1cfe540)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/Telmate/proxmox-api-go/proxmox/config_qemu.go:257 +0x1eaa
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/Telmate/terraform-provider-proxmox/proxmox.prepareDiskSize(0xc0004655c0, 0xc000155890, 0xc0003f35c0, 0x12, 0x1)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:663 +0x50
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc0000cd180, 0xef2d00, 0xc0001b82d0, 0xc0000cd180, 0x0)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:429 +0x12fc
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc0000f9500, 0xc0000b9ae0, 0xc0004e4b80, 0xef2d00, 0xc0001b82d0, 0xc00047d501, 0x0, 0xc00006ab00)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/hashicorp/terraform/helper/schema/resource.go:286 +0x3b4
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc0000f9580, 0xc0000b9a90, 0xc0000b9ae0, 0xc0004e4b80, 0xc0003f3020, 0xc000404900, 0x18)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/hashicorp/terraform/helper/schema/provider.go:285 +0x18f
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc0004e41c0, 0xc0004e4760, 0xc00031e050, 0x0, 0x0)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /home/f0rkz/go/src/github.com/hashicorp/terraform/plugin/resource_provider.go:530 +0x57
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: reflect.Value.call(0xc000080720, 0xc0000104a0, 0x13, 0x10fd806, 0x4, 0xc00006af18, 0x3, 0x3, 0xc0004205c0, 0x0, ...)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/reflect/value.go:447 +0x461
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: reflect.Value.Call(0xc000080720, 0xc0000104a0, 0x13, 0xc000424f18, 0x3, 0x3, 0x0, 0x0, 0x0)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/reflect/value.go:308 +0xa4
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: net/rpc.(*service).call(0xc000464bc0, 0xc000430370, 0xc0000aec10, 0xc0000aec20, 0xc00047cc80, 0xc0003fa220, 0xef3bc0, 0xc0004e4760, 0x16, 0xef3c00, ...)
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox: created by net/rpc.(*Server).ServeCodec
2019-05-22T03:46:06.482Z [DEBUG] plugin.terraform-provider-proxmox:     /usr/local/go/src/net/rpc/server.go:481 +0x42b
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalWriteState
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalIf
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalWriteState
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalWriteDiff
2019-05-22T03:46:06.484Z [DEBUG] plugin: plugin process exited: path=/home/f0rkz/.terraform.d/plugins/terraform-provider-proxmox
2019/05/22 03:46:06 [TRACE] root: eval: *terraform.EvalApplyPost
2019/05/22 03:46:06 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error occurred:
        * proxmox_vm_qemu.netbox: unexpected EOF

2019/05/22 03:46:06 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error occurred:
        * proxmox_vm_qemu.netbox: unexpected EOF

2019/05/22 03:46:06 [TRACE] [walkApply] Exiting eval tree: proxmox_vm_qemu.netbox
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "provisioner.chef (close)"
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "provider.proxmox (close)"
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2019/05/22 03:46:06 [TRACE] dag/walk: upstream errored, not walking "root"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [TRACE] Preserving existing state lineage "9237c5b6-dcac-b9a2-4971-ee3741432c34"
2019/05/22 03:46:06 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-05-22T03:46:06.598Z [WARN ] plugin: error closing client during Kill: err="connection is shut down"
2019-05-22T03:46:06.599Z [DEBUG] plugin.terraform-provider-cloudflare_v1.14.0_x4: 2019/05/22 03:46:06 [ERR] plugin: plugin server: accept unix /tmp/plugin726065545: use of closed network connection
2019-05-22T03:46:06.599Z [DEBUG] plugin.terraform: chef-provisioner (internal) 2019/05/22 03:46:06 [ERR] plugin: plugin server: accept unix /tmp/plugin977573955: use of closed network connection
2019-05-22T03:46:06.599Z [DEBUG] plugin.terraform: chef-provisioner (internal) 2019/05/22 03:46:06 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-05-22T03:46:06.600Z [DEBUG] plugin: plugin process exited: path=/home/f0rkz/tf-f0rkznet-home/.terraform/plugins/linux_amd64/terraform-provider-cloudflare_v1.14.0_x4
2019-05-22T03:46:06.601Z [DEBUG] plugin: plugin process exited: path=/bin/terraform



!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Any ideas?

@f0rkz
Copy link
Contributor Author

f0rkz commented May 22, 2019

Can't seem to track this one down. Is anyone else seeing this issue on VM creation?

Giving up for the night. Thanks for all the help so far!

@ggongaware
Copy link
Member

Pushed work around for agent types on the proxmox-api-go repo

@f0rkz
Copy link
Contributor Author

f0rkz commented May 23, 2019

You are all steely eyed missile men. Thank you thank you thank you!

$ terraform plan -var-file=prod.tfvars
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.

cloudflare_record.netbox_f0rkznet_net: Refreshing state... (ID: a9c6e83d304c4055a7121c5e9e375f1c)
proxmox_vm_qemu.netbox: Refreshing state... (ID: pve/qemu/104)

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants