CiscoDevNet / ansible-dcnm

Apache License 2.0
47 stars 37 forks source link

v2.4.0 dcnm_network throws errors with unicast-only fabrics #185

Closed allenrobel closed 1 year ago

allenrobel commented 1 year ago

After upgrade from v2.3.0 to v2.4.0, either of the following errors may be seen with cisco.dcnm.dcnm_network.

If network(s) do not already exist:

"Invalid: Fabric mode is not multicast and Multicast Address: 239.1.1.0 is present"

Or, if networks already exist and replace is used:

"Invalid: Ingress Replication is true and Multicast Address is 239.1.1.0"

Below is an example playbook to recreate this:

- hosts: ndfc
  gather_facts: false
  name: test
  tasks:
  - cisco.dcnm.dcnm_network:
     fabric: MSD
     state: replaced
     config:
     - net_name: n1111
       vrf_name: v1
       vlan_id: 1111
       gw_ip_subnet: 10.21.1.1/24
       attach:
  vars:
    ansible_connection: httpapi

I believe the following diff between v2.3.0 and v2.4.0 is relevant here:

2175c2187
<                 multicast_group_address=dict(type="ipv4", default=""),
---
>                 multicast_group_address=dict(type="ipv4", default="239.1.1.0"),
2239c2251
<                 multicast_group_address=dict(type="ipv4", default=""),
---
>                 multicast_group_address=dict(type="ipv4", default="239.1.1.0"),

A workaround is to add multicast_group_address with an empy string value, per below:

- hosts: ndfc
  gather_facts: false
  name: test
  tasks:
  - cisco.dcnm.dcnm_network:
     fabric: MSD
     state: replaced
     config:
     - net_name: n1111
       multicast_group_address: ""
       vrf_name: v1
       vlan_id: 1111
       gw_ip_subnet: 10.21.1.1/24
       attach:
  vars:
    ansible_connection: httpapi
praveenramoorthy commented 1 year ago

@allenrobel Thanks for raising this issue. We will check and will work on a fix.

mikewiebe commented 1 year ago

Quick update here. I was able to recreate the issue and as stated by @allenrobel it's specific to unicast-only fabrics. Working on a fix

praveenramoorthy commented 1 year ago

Fixed as part of #208