VRF-lite extension fails when role is border gateway
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Ansible Version and collection version
2.17.2
DCNM version
- V 12.2.2.238
Affected module(s)
- dcnm_vrf
Ansible Playbook
- name: Create and attach VRFs to switches in {{ defaults.msd.fabric_name }} fabric
cisco.dcnm.dcnm_vrf:
fabric: '{{ defaults.msd.fabric_name }}'
state: '{{ state | default("merged") }}'
config: '{{ vrfs_for_module }}'
tags: vrfs
Debug Output
TASK [Create and attach VRFs to switches in MSD fabric] **********************************************************************************************************************************************************************
task path: /Users/xxxxxx/lab/NDFC_Ansible/40_create_vrf_w_module.yaml:22
fatal: [ndfc]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"config": [
{
"adv_default_routes": false,
"attach": [
{
"deploy": true,
"ip_address": "10.58.51.122"
},
{
"deploy": true,
"ip_address": "10.58.51.123"
},
{
"deploy": true,
"ip_address": "10.58.52.65"
},
{
"deploy": true,
"ip_address": "10.58.52.66"
},
{
"deploy": true,
"ip_address": "10.58.51.124",
"vrf_lite": [
{
"dot1q": 2,
"interface": "Ethernet1/55",
"ipv4_addr": "192.168.254.108/31",
"neighbor_ipv4": "192.168.254.109",
"peer_vrf": "infra"
}
]
},
{
"deploy": true,
"ip_address": "10.58.51.125",
"vrf_lite": [
{
"dot1q": 2,
"interface": "Ethernet1/55",
"ipv4_addr": "192.168.254.110/31",
"neighbor_ipv4": "192.168.254.111",
"peer_vrf": "infra"
}
]
}
],
"max_bgp_paths": 4,
"static_default_route": false,
"vlan_id": 3100,
"vrf_extension_template": "Default_VRF_Extension_Universal",
"vrf_id": 51000,
"vrf_name": "infra",
"vrf_template": "Default_VRF_Universal"
}
],
"fabric": "MSD",
"state": "merged"
}
},
"msg": {
"DATA": {
"Error": "Internal Server Error",
"message": "A JSONObject text must begin with '{' at 1 [character 2 line 1]",
"path": "/rest/top-down/fabrics/MSD/vrfs/attachments",
"status": "500",
"timestamp": "2024-09-10 16:38:30.944"
},
"MESSAGE": "Internal Server Error",
"METHOD": "POST",
"REQUEST_PATH": "https://10.58.51.97:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/top-down/fabrics/MSD/vrfs/attachments",
"RETURN_CODE": 500
}
}
### Expected Behavior
VRF lite configuration is applied to border gateway.
### Actual Behavior
Task fails but VRF is actually created in NDFC, but not attached to the Border Gateway. The VRF-lite extension is also saved in NDFC database but, before the VRF can be attached and given the role of the device includes border gateway, the extension type (vrf lite + multisite) must be selected before VRF can be attached.
### Steps to Reproduce
Attach a VRF with VRF-lite enabled to a device with border gateway role.
### References
@gnakh Could you share the playbook fully, related config file and variable details
Hi @gnakh, I checked with the above outputs, tried with a similar minimal task and see that it's succeeded. As a result, closing the issue. Please feel free to reopen it if you see the issue again and help us with the playbook, configs and variables.
Thanks, Akshay
<<< Test Outputs >>>
ND Version 3.2.1i
NDFC Version Version 12.2.2.241
Ansible Version ansible [core 2.18.5]
Play Results: changed: [10.78.210.227] => { "changed": true, "diff": [ { "attach": [ { "deploy": true, "ip_address": "192.168.10.2", "vlan_id": 3100 } ], "vrf_name": "infra" } ], "invocation": { "module_args": { "config": [ { "adv_default_routes": false, "attach": [ { "ip_address": "192.168.10.2", "vrf_lite": [ { "dot1q": 2, "interface": "Ethernet1/2", "ipv4_addr": "192.168.254.108/31", "neighbor_ipv4": "192.168.254.109", "peer_vrf": "infra" } ] } ], "deploy": true, "max_bgp_paths": 4, "static_default_route": false, "vlan_id": 3100, "vrf_extension_template": "Default_VRF_Extension_Universal", "vrf_id": 51000, "vrf_name": "infra", "vrf_template": "Default_VRF_Universal" } ], "fabric": "AK-Test", "state": "merged" } }, "response": [ { "DATA": { "infra-[ANUOOS0P12A/bleaf]": "SUCCESS" }, "MESSAGE": "OK", "METHOD": "POST", "REQUEST_PATH": "https://192.168.1.1:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/top-down/fabrics/AK-Test/vrfs/attachments", "RETURN_CODE": 200 }, { "DATA": { "status": "Deployment of VRF(s) has been initiated successfully" }, "MESSAGE": "OK", "METHOD": "POST", "REQUEST_PATH": "https://192.168.1.1:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/top-down/fabrics/AK-Test/vrfs/deployments", "RETURN_CODE": 200 } ] }