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

cpumodel Crash report #530

Closed
TGM opened this issue Feb 14, 2024 · 1 comment · Fixed by #534
Closed

cpumodel Crash report #530

TGM opened this issue Feb 14, 2024 · 1 comment · Fixed by #534

Comments

@TGM
Copy link

TGM commented Feb 14, 2024

Description

Just trying the newest version.


Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.vmk["vmk-dev-intel-01"].opennebula_virtual_machine.vm is tainted, so must be replaced
-/+ resource "opennebula_virtual_machine" "vm" {
      ~ default_tags           = {} -> (known after apply)
      ~ gid                    = 0 -> (known after apply)
      ~ gname                  = "oneadmin" -> (known after apply)
      ~ id                     = "7" -> (known after apply)
      ~ ip                     = "x.x.x.x" -> (known after apply)
      ~ lcmstate               = 0 -> (known after apply)
        name                   = "vmk-dev-intel-01"
      ~ permissions            = "600" -> "660"
      ~ state                  = 6 -> (known after apply)
      ~ tags_all               = {} -> (known after apply)
      ~ template_disk          = [] -> (known after apply)
      ~ template_nic           = [] -> (known after apply)
      ~ template_section_names = {} -> (known after apply)
      ~ template_tags          = {} -> (known after apply)
      ~ uid                    = 0 -> (known after apply)
      ~ uname                  = "oneadmin" -> (known after apply)
        # (12 unchanged attributes hidden)

      ~ cpumodel {
          - model = "Skylake-Client-IBRS" -> null
        }

      ~ disk {
          + computed_cache           = (known after apply)
          ~ computed_dev_prefix      = "vd" -> (known after apply)
          + computed_discard         = (known after apply)
          ~ computed_driver          = "qcow2" -> (known after apply)
          + computed_io              = (known after apply)
          ~ computed_size            = 30720 -> (known after apply)
          ~ computed_target          = "vda" -> (known after apply)
          ~ computed_volatile_format = "qcow2" -> (known after apply)
          ~ disk_id                  = 0 -> (known after apply)
            # (3 unchanged attributes hidden)
        }
      ~ disk {
          + computed_cache           = (known after apply)
          ~ computed_dev_prefix      = "vd" -> (known after apply)
          + computed_discard         = (known after apply)
          ~ computed_driver          = "raw" -> (known after apply)
          + computed_io              = (known after apply)
          ~ computed_size            = 30720 -> (known after apply)
          ~ computed_target          = "vdb" -> (known after apply)
          ~ computed_volatile_format = "raw" -> (known after apply)
          ~ disk_id                  = 1 -> (known after apply)
            # (3 unchanged attributes hidden)
        }

      ~ graphics {
          ~ port          = "5907" -> (known after apply)
          - random_passwd = false -> null
            # (3 unchanged attributes hidden)
        }

      ~ nic {
          ~ computed_ip              = "x.x.x.x" -> (known after apply)
          ~ computed_mac             = "02:00:7a:5f:c3:90" -> (known after apply)
          ~ computed_model           = "virtio" -> (known after apply)
          + computed_physical_device = (known after apply)
          ~ computed_security_groups = [] -> (known after apply)
          ~ computed_virtio_queues   = "1" -> (known after apply)
          ~ network                  = "vlan500" -> (known after apply)
          - network_mode_auto        = false -> null
          ~ nic_id                   = 0 -> (known after apply)
          - security_groups          = [] -> null
            # (4 unchanged attributes hidden)
        }

      + template_section {
          + elements = {
              + "data" = "<memtune><hard_limit unit='MB'>256</hard_limit></memtune>"
              + "type" = "kvm"
            }
          + name     = "RAW"
        }

        # (2 unchanged blocks hidden)
    }

Plan: 1 to add, 0 to change, 1 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

module.vmk["vmk-dev-intel-01"].opennebula_virtual_machine.vm: Destroying... [id=7]
module.vmk["vmk-dev-intel-01"].opennebula_virtual_machine.vm: Still destroying... [id=7, 10s elapsed]
module.vmk["vmk-dev-intel-01"].opennebula_virtual_machine.vm: Destruction complete after 15s
module.vmk["vmk-dev-intel-01"].opennebula_virtual_machine.vm: Creating...
╷
│ Error: Plugin did not respond
│ 
│   with module.vmk["vmk-dev-intel-01"].opennebula_virtual_machine.vm,
│   on ../single-vm/main.tf line 151, in resource "opennebula_virtual_machine" "vm":
│  151: resource "opennebula_virtual_machine" "vm" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵

Stack trace from the terraform-provider-opennebula_v1.4.0 plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 113 [running]:
github.com/OpenNebula/terraform-provider-opennebula/opennebula.generateVMTemplate(0xc00078e848?, 0xc0007201c8)
        github.com/OpenNebula/terraform-provider-opennebula/opennebula/shared_schemas.go:680 +0xd77
github.com/OpenNebula/terraform-provider-opennebula/opennebula.generateVm(0x0?, {0xc668e0?, 0xc0002f4940}, 0x0)
        github.com/OpenNebula/terraform-provider-opennebula/opennebula/resource_opennebula_virtual_machine.go:2230 +0x35e
github.com/OpenNebula/terraform-provider-opennebula/opennebula.resourceOpennebulaVirtualMachineCreate({0xeb3848, 0xc0004c8180}, 0xc00032f500, {0xc668e0?, 0xc0002f4940})
        github.com/OpenNebula/terraform-provider-opennebula/opennebula/resource_opennebula_virtual_machine.go:350 +0x8b1
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc00045c620, {0xeb3880, 0xc00011f380}, 0xd?, {0xc668e0, 0xc0002f4940})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:707 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00045c620, {0xeb3880, 0xc00011f380}, 0xc0004111e0, 0xc00032ee00, {0xc668e0, 0xc0002f4940})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:837 +0xa7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00022b7a0, {0xeb3880?, 0xc00011f230?}, 0xc0002a00f0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/grpc_provider.go:1021 +0xe3c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000339180, {0xeb3880?, 0xc00011e3f0?}, 0xc0007ba070)
        github.com/hashicorp/terraform-plugin-go@v0.14.1/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xd2ce00?, 0xc000339180}, {0xeb3880, 0xc00011e3f0}, 0xc0007ba000, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.14.1/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003661e0, {0xeb6b00, 0xc00050a1a0}, 0xc0007ac000, 0xc00046ab10, 0x13b6960, 0x0)
        google.golang.org/grpc@v1.56.3/server.go:1335 +0xde3
google.golang.org/grpc.(*Server).handleStream(0xc0003661e0, {0xeb6b00, 0xc00050a1a0}, 0xc0007ac000, 0x0)
        google.golang.org/grpc@v1.56.3/server.go:1712 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.1()
        google.golang.org/grpc@v1.56.3/server.go:947 +0xca
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.56.3/server.go:958 +0x15c

Error: The terraform-provider-opennebula_v1.4.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Terraform and Provider version

Terraform v1.5.5
on linux_amd64

  • provider registry.terraform.io/e-breuninger/netbox v3.5.1
  • provider registry.terraform.io/hashicorp/cloudinit v2.3.2
  • provider registry.terraform.io/hashicorp/dns v3.4.0
  • provider registry.terraform.io/hashicorp/vault v3.24.0
  • provider registry.terraform.io/ivoronin/macaddress v0.3.2
  • provider registry.terraform.io/opennebula/opennebula v1.4.0

Affected resources and data sources

No response

Terraform configuration

No response

Expected behavior

Not crash...

Actual behavior

Crashed

Steps to Reproduce

set the cpumodel resource to ""

Debug output

No response

Panic output

No response

Important factoids

No response

References

No response

@TGM TGM changed the title Crash report cpumodel Crash report Feb 14, 2024
@frousselet frousselet added this to the 1.4.1 milestone Feb 15, 2024
treywelsh added a commit that referenced this issue Mar 20, 2024
@treywelsh treywelsh self-assigned this Mar 20, 2024
@treywelsh
Copy link
Collaborator

if you want to give it a try, here's the PR: #534

treywelsh added a commit that referenced this issue Mar 20, 2024
treywelsh added a commit that referenced this issue Mar 28, 2024
frousselet pushed a commit that referenced this issue Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants