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

[Bug]: broadcast_domain: "duplicate ports" error when adding VLANs in multi-node clusters #409

Open
acch opened this issue Feb 18, 2025 · 1 comment · May be fixed by #410
Open

[Bug]: broadcast_domain: "duplicate ports" error when adding VLANs in multi-node clusters #409

acch opened this issue Feb 18, 2025 · 1 comment · May be fixed by #410
Assignees
Labels
bug Something isn't working
Milestone

Comments

@acch
Copy link
Contributor

acch commented Feb 18, 2025

Terraform Core Version

1.7.1

ONTAP Provider Version

2.1.0

Affected Resource(s)

  • netapp-ontap_broadcast_domain

Expected Behavior

Adding VLANs to broadcast_domains should work in multi-node clusters. The following configuration should apply successfully:

resource "netapp-ontap_network_broadcast_domain" "this" {
  cx_profile_name = var.cx_profile_name

  ipspace = var.ipspace
  name    = var.broadcast_domain

  mtu = var.mtu
}

resource "netapp-ontap_port" "this" {
  for_each = var.nodes

  cx_profile_name = var.cx_profile_name

  broadcast_domain = {
    id = netapp-ontap_network_broadcast_domain.this.id
  }

  node = {
    name = each.key
  }

  type = "vlan"
  vlan = {
    base_port = var.base_port_name
    tag       = var.tag
  }
}

Actual Behavior

Adding VLANs to broadcast_domains does not work in multi-node clusters. The following configuration produces a "Duplicate Set Element" error:

resource "netapp-ontap_network_broadcast_domain" "this" {
  cx_profile_name = var.cx_profile_name

  ipspace = var.ipspace
  name    = var.broadcast_domain

  mtu = var.mtu
}

resource "netapp-ontap_port" "this" {
  for_each = var.nodes

  cx_profile_name = var.cx_profile_name

  broadcast_domain = {
    id = netapp-ontap_network_broadcast_domain.this.id
  }

  node = {
    name = each.key
  }

  type = "vlan"
  vlan = {
    base_port = var.base_port_name
    tag       = var.tag
  }
}

Relevant Error/Panic Output Snippet

╷
│ Error: Duplicate Set Element
│ 
│   with module.netapp.module.network.netapp-ontap_network_broadcast_domain.this,
│   on ../../modules/network/main.tf line 12, in resource "netapp-ontap_network_broadcast_domain" "this":
│   12: resource "netapp-ontap_network_broadcast_domain" "this" {
│ 
│ This attribute contains duplicate values of: tftypes.String<"a0a-1234">

Terraform Configuration Files

resource "netapp-ontap_network_broadcast_domain" "this" {
  cx_profile_name = var.cx_profile_name

  ipspace = var.ipspace
  name    = var.broadcast_domain

  mtu = var.mtu
}

resource "netapp-ontap_port" "this" {
  for_each = var.nodes

  cx_profile_name = var.cx_profile_name

  broadcast_domain = {
    id = netapp-ontap_network_broadcast_domain.this.id
  }

  node = {
    name = each.key
  }

  type = "vlan"
  vlan = {
    base_port = var.base_port_name
    tag       = var.tag
  }
}

Steps to Reproduce

  • terraform init
  • terraform plan
  • terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

Yes

@acch acch added the bug Something isn't working label Feb 18, 2025
@acch
Copy link
Contributor Author

acch commented Feb 18, 2025

I'm hitting an issue with broadcast_domain resource, which I haven't been able to catch in my internal testing...
I already know where the error originates from, and will supply a PR to fix it.

acch added a commit to acch/terraform-provider-netapp-ontap that referenced this issue Feb 18, 2025
acch added a commit to acch/terraform-provider-netapp-ontap that referenced this issue Feb 18, 2025
…in multi-node clusters NetApp#409

Signed-off-by: Achim Christ <achim.christ@sva.de>
@suhasbshekar suhasbshekar moved this from Future to 2.1.1 in Terraform for ONTAP Roadmap Feb 20, 2025
@suhasbshekar suhasbshekar added this to the 2.1.1 milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 2.1.1
2 participants