cisco-open / terraform-provider-dcloud

Terraform provider to manage Topologies, Networks, VMs, and Hardware using the Cisco dCloud Topology Builder
Mozilla Public License 2.0
2 stars 2 forks source link

Getting "Error processing requst errors" when building more custom VMs #23

Open marinalf opened 1 year ago

marinalf commented 1 year ago

Description

Unable to create more custom VMs such as Nexus Dashboard and CML.

For ND, it is already pre-configured with an IP from the default network, but there is no data source to link to the network interface block. The "dcloud_neworks" data source does not accept a filter block to get only the default (primary) network from the outputs. But while creating it in a new network, it sends out this error below. Same for the CML config block.

│ Error: Error processing requst [Server Response: 500 Internal Server Error] (logref: 9697af659bb86e69):
│ Something went wrong. This error has been logged and will be looked at by our team asap

As a side note, in the case of ND, the VM name in the inventory is "Nexus_dashboard_2.3_node_1" but it does not match the name on the GUI. Same for CML, inventory says "sp_cml2_2.6.0-5_amd64-6" but this does not exist in RTP. I am able to create a windows jump box in the same config/topology and name matches on both the inventory as well as on the GUI.

Thanks for checking.

Affected Version

Steps to Reproduce

Initial code is here.

Checklist

philipowen commented 1 year ago

@marinalf What value were you using for the OS Family for the VM? I can see an error in the logs suggesting this may be a case sensitivity issue.

marinalf commented 1 year ago

Thanks, @philipowen! It is case-sensitive, I switched to LINUX now. The only other pending issues now are: 1) It does not take the defined name for the VMs in the first run, I have to run the plan a second time for the name to be added. 2) Specifically for ND, that is a pre-configured VM with an IP from the default network. I tried using the dcloud_networks data source with filter for the default network, but it does not accept a filter block. Any other way to attach the main adapter to the existing default network?

  network_interfaces {
    network_uid = "VLAN-PRIMARY" # Need data source support for existing network
    name        = "Network adapter 1"
    mac_address = "00:50:56:97:d7:90"
    type        = "VIRTUAL_VMXNET_3"
    ip_address  = "198.18.133.100"
    rdp_enabled = false
  }
philipowen commented 1 year ago

Glad to hear it worked @marinalf .

I beleive there's a fix for the IP issue coming pretty soon. I'm less sure about the first one, though I think is also a known issue and is due to be addressed.

hughwphamill commented 1 year ago

Hi @marinalf

The default network should no longer be created with the topology as per v0.1.15 of the provider, so you should be able to specify that network in your terraform file, and reference it in VMs now, thanks for reporting the issue!

The network ID is VLAN-PRIMARY

e.g.

resource "dcloud_network" "default_network" {
  name                 = "Default"
  description          = "The default network"
  inventory_network_id = "VLAN-PRIMARY"
  topology_uid         = dcloud_topology.test_topology.id
}
marinalf commented 1 year ago

Perfect! It is working now, @hughwphamill.

I still have to run the plan twice for the VM names to save, everything else is good.

hughwphamill commented 1 year ago

Thanks for confirming @marinalf

The VM Name issue is known and we have TB issue open on the internal code base to track/fix