Skip to content

Error when creating Server Profile Template with SAS Logical JBOD #396

@WannaBeGeekster

Description

@WannaBeGeekster

Scenario
I am trying to create a Server Profile Template that includes 9 drives in a JBOD configuration. I have tried a few different configuration stanza attempts for creating the SPT. I have not found an example that includes the exact configuration I am attempting to try here so it is possible that I am not providing the correct configuration to create the drive properly. However, I have gotten terraform plan to run successfully without complaint of the configuration syntax. The server profile creates successfully without the sas_logical_jbod and related controller configuration stanza in there. So I know it doesn't have anything to do with anything else in the resource definition.

Environment
Terraform OneView Provider: 6.2
API Version: 2800

Error received:
Stack trace from the terraform-provider-oneview_v6.2.0-13 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 44 [running]:
github.com/HewlettPackard/terraform-provider-oneview/oneview.resourceServerProfileTemplateCreate(0xc000432150, 0x111b3a0, 0xc0008d2100, 0x2, 0x1aa9e60)
github.com/HewlettPackard/terraform-provider-oneview/oneview/resource_server_profile_template.go:1628 +0xa813
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000589680, 0xc0007b5540, 0xc000733c80, 0x111b3a0, 0xc0008d2100, 0x1109801, 0xc000926028, 0xc0006b22d0)
github.com/hashicorp/terraform-plugin-sdk@v1.7.0/helper/schema/resource.go:305 +0x375
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc0005ea900, 0xc000279a10, 0xc0007b5540, 0xc000733c80, 0xc0006843e8, 0xc00000f460, 0x110b4e0)
github.com/hashicorp/terraform-plugin-sdk@v1.7.0/helper/schema/provider.go:294 +0x99
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00000e118, 0x14717e0, 0xc0002ee0f0, 0xc0008cc6c0, 0xc00000e118, 0xc0002ee0f0, 0xc0002fdb78)
github.com/hashicorp/terraform-plugin-sdk@v1.7.0/internal/helper/plugin/grpc_provider.go:885 +0x8ab
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x121ece0, 0xc00000e118, 0x14717e0, 0xc0002ee0f0, 0xc0008cc660, 0x0, 0x14717e0, 0xc0002ee0f0, 0xc0002fe000, 0x1c68)
github.com/hashicorp/terraform-plugin-sdk@v1.7.0/internal/tfplugin5/tfplugin5.pb.go:3189 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000001e00, 0x147aa40, 0xc000885200, 0xc00015e900, 0xc00059ce40, 0x1a68b60, 0x0, 0x0, 0x0)
google.golang.org/grpc@v1.27.1/server.go:1024 +0x522
google.golang.org/grpc.(*Server).handleStream(0xc000001e00, 0x147aa40, 0xc000885200, 0xc00015e900, 0x0)
google.golang.org/grpc@v1.27.1/server.go:1313 +0xd34
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0000a41a0, 0xc000001e00, 0x147aa40, 0xc000885200, 0xc00015e900)
google.golang.org/grpc@v1.27.1/server.go:722 +0xa5
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.27.1/server.go:720 +0xa5

Error: The terraform-provider-oneview_v6.2.0-13 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.

│ Error: Plugin did not respond

│ with oneview_server_profile_template.InfraSPTTest,
│ on main.tf line 155, in resource "oneview_server_profile_template" "InfraSPTTest":
│ 155: resource "oneview_server_profile_template" "InfraSPTTest" {

│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more
│ details.

main.tf:

resource "oneview_server_profile_template" "InfraSPTTest" {
name = var.infra_name
type = "ServerProfileTemplateV8"
enclosure_group = "EG1"
server_hardware_type = "SY 480 Gen10 1"

bios_option {
manage_bios = true
overridden_settings {
id = "WorkloadProfile"
value = "Virtualization-MaxPerformance"
}
overridden_settings {
id = "MinProcIdlePower"
value = "NoCStates"
}
overridden_settings {
id = "IntelUpiPowerManagement"
value = "Disabled"
}
overridden_settings {
id = "MinProcIdlePkgState"
value = "NoState"
}
overridden_settings {
id = "EnergyPerfBias"
value = "MaxPerf"
}
overridden_settings {
id = "UncoreFreqScaling"
value = "Maximum"
}
overridden_settings {
id = "PowerRegulator"
value = "StaticHighPerf"
}
overridden_settings {
id = "EnergyEfficientTurbo"
value = "Disabled"
}
overridden_settings {
id = "UrlBootFile"
value = var.ipxeboot_url
}
overridden_settings {
id = "NumaGroupSizeOpt"
value = "Clustered"
}
overridden_settings {
id = "SubNumaClustering"
value = "Enabled"
}
overridden_settings {
id = "CollabPowerControl"
value = "Disabled"
}
overridden_settings {
id = "HttpSupport"
value = "HttpOnly"
}
}

boot {
manage_boot = true
boot_order = ["PXE"]
}

boot_mode {
manage_mode = true
mode = "UEFIOptimized"
pxe_boot_policy = "IPv4"
secure_boot = "Disabled"
}

connection_settings {
compliance_control = "CheckedMinimum"
manage_connections = true

connections {
  id             = 1
  name           = "dev_network_01"
  function_type  = "Ethernet"
  network_uri    = data.oneview_ethernet_network.ethernetNetwork.uri
  isolated_trunk = false
  port_id        = "Mezz 3:1-a"
  requested_mbps = "2500"
  requested_vfs  = "0"
  lag_name       = "LAG1"
  boot {
    priority           = "Primary"
    ethernet_boot_type = "PXE"
  }
}

connections {
  id             = 2
  name           = "dev_network_02"
  function_type  = "Ethernet"
  network_uri    = data.oneview_ethernet_network.ethernetNetwork.uri
  isolated_trunk = false
  port_id        = "Mezz 3:2-a"
  requested_mbps = "2500"
  requested_vfs  = "0"
  lag_name       = "LAG1"
  boot {
    priority           = "NotBootable"
  }
}

}

firmware {
compliance_control = "Checked"
manage_firmware = true
firmware_install_type = "FirmwareOnlyOfflineMode"
force_install_firmware = false
firmware_baseline_uri = "/rest/firmware-drivers/Synergy_Service_Pack_SSP_2021_05_01_Z7550-97181"
firmware_activation_type = "Immediate"
}

local_storage {
compliance_control = "CheckedMinimum"
sas_logical_jbod {
id = 1
description = "JBOD Storage for Infrastructure Nodes."
device_slot = "Mezz 1"
name = "OCS_Storage_Node"
num_physical_drive = 9
drive_min_size_gb = 3840
drive_max_size_gb = 3840
drive_technology = "SasSsd"
erase_data = false
persistent = true
}
controller {
device_slot = "Embedded"
drive_write_cache = "Enabled"
initialize = true
mode = "Mixed"
predictive_spare_rebuild = "Unmanaged"
logical_drives {
name = "boot_drive"
accelerator = "Unmanaged"
bootable = true
raid_level = "RAID1"
num_physical_drives = 2
}
}
controller {
device_slot = "Mezz 1"
mode = "Mixed"
initialize = true
drive_write_cache = "Unmanaged"
predictive_spare_rebuild = "Unmanaged"
logical_drives {
name = "Storage_Drive"
sas_logical_jbod_id = 1
}
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions