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

VRF-lite extension fails when role is border gateway #326

Open
gnakh opened this issue Sep 10, 2024 · 1 comment
Open

VRF-lite extension fails when role is border gateway #326

gnakh opened this issue Sep 10, 2024 · 1 comment

Comments

@gnakh
Copy link

gnakh commented Sep 10, 2024

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

@prabahal
Copy link

prabahal commented Dec 5, 2024

@gnakh Could you share the playbook fully, related config file and variable details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants