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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

LACP on Distributed Switches #2110

Open
1 of 4 tasks
zejar opened this issue Jan 11, 2024 · 1 comment
Open
1 of 4 tasks

LACP on Distributed Switches #2110

zejar opened this issue Jan 11, 2024 · 1 comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage

Comments

@zejar
Copy link

zejar commented Jan 11, 2024

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a 馃憤 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

v1.5.7

Terraform Provider

v2.6.1

VMware vSphere

v7.0.3

Description

When configuring a Distributed Switch with LACP on a vSphere environment with "enhanced" Distributed Switches (LACP API version "multipleLag") LACP is not being configured and an error is thrown in vSphere stating that the LACP config is not compatible with API version "multipleLag".

The output from Terraform pasted below doesn't display the entire error and neither does the debug option. In vSphere the entire error is printed however: "The configurations of the objects are in conflict. Link Aggregation Control Protocol group configured on DSwitch1 conflicts with the Link Aggregation Control Protocol API version multipleLag.".
The error makes sense if the "multipleLag" API version doesn't understand the LACP options Terraform tries to configure. The "singleLag" API version ("basic" switches instead of "enhanced" switches) is unfortunately not available when creating Distributed Switches in VMware 7.

Affected Resources or Data Sources

resource/vsphere_distributed_virtual_switch

Terraform Configuration

resource "vsphere_distributed_virtual_switch" "vds" {
  count                    = var.dswitch_create ? 1 : 0
  name                     = var.distributed_vswitch_name
  datacenter_id            = data.vsphere_datacenter.use_datacenter.id
  lacp_api_version         = var.distributed_vswitch_lacp_api_version
  version                  = var.distributed_vswitch_version

  uplinks = var.distributed_vswitch_uplinks

  dynamic "host" {
    for_each = var.distributed_vswitch_hosts
    content {
      host_system_id = host.value["host_system_id"]
      devices        = host.value["devices"]
    }
  }

  active_uplinks  = var.distributed_vswitch_active_uplinks
  standby_uplinks = var.distributed_vswitch_standby_uplinks
  check_beacon    = var.distributed_vswitch_check_beacon
  failback        = var.distributed_vswitch_failback
  notify_switches = var.distributed_vswitch_notify_switches
  teaming_policy  = var.distributed_vswitch_teaming_policy

  network_resource_control_enabled = var.distributed_vswitch_network_resource_control_enabled
  network_resource_control_version = var.distributed_vswitch_network_resource_control_version

  lacp_enabled = var.distributed_vswitch_lacp_enabled
  lacp_mode    = var.distributed_vswitch_lacp_mode
}

module "dswitch_1" {
  source                                               = "git::ssh://git@<redacted>"
  dswitch_create                                       = true
  obj_dc                                               = "<redacted>"
  distributed_vswitch_name                             = "DSwitch1"
  distributed_vswitch_description                      = "VM networks"
  distributed_vswitch_network_resource_control_enabled = true
  distributed_vswitch_network_resource_control_version = "version3"
  distributed_vswitch_uplinks                          = ["Uplink 1", "Uplink 2"]
  distributed_vswitch_active_uplinks                   = ["Uplink 1", "Uplink 2"]
  distributed_vswitch_hosts = [
    {
      host_system_id = "${module.vsphere_hosts_704.host_id_cluster}"
      devices        = ["vmnic0", "vmnic1"]
    },
    {
      host_system_id = "${module.vsphere_hosts_705.host_id_cluster}"
      devices        = ["vmnic0", "vmnic1"]
    },
    {
      host_system_id = "${module.vsphere_hosts_706.host_id_cluster}"
      devices        = ["vmnic0", "vmnic1"]
    }
  ]
  distributed_vswitch_teaming_policy = "loadbalance_srcid"
  distributed_vswitch_lacp_api_version = "multipleLag"
  distributed_vswitch_lacp_enabled     = true
  distributed_vswitch_lacp_mode        = "active"
  distributed_vswitch_check_beacon     = false
}

Debug Output

https://gist.github.com/zejar/542fc7feada8de2f90ef1bfc7f80aa66

Panic Output

No response

Expected Behavior

Terraform should be able to configure LACP on an "enhanced" Distributed Switch which is the only version available in VMware 7.

Actual Behavior

LACP isn't configured because the LACP config isn't compatible with the Distributed Switches in vSphere 7.

Output from vSphere: "The configurations of the objects are in conflict. Link Aggregation Control Protocol group configured on DSwitch1 conflicts with the Link Aggregation Control Protocol API version multipleLag."

Steps to Reproduce

Configuring a Distributed Switch in vsphere 7 environment with the following options:

  lacp_api_version = "multipleLag"
  lacp_enabled     = true
  lacp_mode        = "active"

Environment Details

No response

Screenshots

No response

References

No response

@zejar zejar added bug Type: Bug needs-triage Status: Issue Needs Triage labels Jan 11, 2024
Copy link

Hello, zejar! 馃枑

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

1 participant