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

dcnm_fabric: Fix controller feature evaluation and add initial ND 4.0 support #360

Open
allenrobel opened this issue Jan 7, 2025 · 0 comments · May be fixed by #362
Open

dcnm_fabric: Fix controller feature evaluation and add initial ND 4.0 support #360

allenrobel opened this issue Jan 7, 2025 · 0 comments · May be fixed by #362
Assignees
Labels
bug Something isn't working pr_submitted PR Submitted

Comments

@allenrobel
Copy link
Collaborator

allenrobel commented Jan 7, 2025

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

ansible [core 2.17.5]
  config file = /Users/arobel/.ansible.cfg
  configured module search path = ['/Users/arobel/repos/ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/arobel/repos/ndfc-python/.venv/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/arobel/repos/ansible/collections
  executable location = /Users/arobel/repos/ndfc-python/.venv/bin/ansible
  python version = 3.12.4 (main, Jun  6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)] (/Users/arobel/repos/ndfc-python/.venv/bin/python)
  jinja version = 3.1.4
  libyaml = True

DCNM version

  • V 3.6.0

Affected module(s)

  • dcnm_fabric

Ansible Playbook

Note, the below playbook does work in my ND 4.0 setup. However, others are reporting that simple fabric creation does not work. The error is pasted below. From this error, it's clear response for endpoint /appcenter/cisco/ndfc/api/v1/fm/features is empty.

TASK [cisco.nac_dc_vxlan.create : Manage fabric ND-VXLAN-test in NDFC] ********************************************************************************************************************************************************************************
fatal: [nac-ndfc1]: FAILED! => {"changed": false, "msg": "Merged.get_need: Features required for fabric ND-VXLAN-test of type VXLAN_EVPN are not running on the controller. Review controller settings at Fabric Controller -> Admin -> System Settings -> Feature Management", "response": [{}], "result": [{}]}
- name: test dcnm_fabric_dcnm
  hosts: ndfc
  tasks:
    -   name: merged fabrics (dcnm_send)
        cisco.dcnm.dcnm_fabric:
            state: merged
            config:
             -   FABRIC_NAME: VXLAN_Fabric
                 FABRIC_TYPE: VXLAN_EVPN
                 BGP_AS: 65000
             -   FABRIC_NAME: MSD_Fabric
                 FABRIC_TYPE: VXLAN_EVPN_MSD
             -   FABRIC_NAME: LAN_Fabric
                 FABRIC_TYPE: LAN_CLASSIC
             -   FABRIC_NAME: ISN
                 BGP_AS: 65022
                 FABRIC_TYPE: ISN
        register: result
    -   debug:
            var: result

Debug Output

Expected Behavior

ND 4.0 output for the API endpoint /appcenter/cisco/ndfc/api/v1/fm/features no longer includes the following objects:

  • lan
  • pnm
  • vxlan

These objects are used by the dcnm_fabric module when interacting with an ND 3.2.1e or earlier controller to determine if a given fabric type (VXLAN_EVPN, IPFM, LAN_CLASSIC, ISN, etc) can be created. For example, VXLAN_EVPN fabric type requires that the "vxlan" feature's oper_state == enabled.

With ND 4.0's unified architecture, the above objects presumably are no longer required (likely they are enabled without the user having to explicitly enable them).

Actual Behavior

See Expected Behavior

Steps to Reproduce

Attempt to create a fabric with ND 4.0 using the dcnm_fabric module.

In my lab, creating VXLAN_EVPN, MSD, and LAN_CLASSIC fabrics worked, but others have reported this not to be the case. Hence, need to investigate further.

Action items

  • Determine if ND 4.0 enables the above features without user intervention.
  • If these features are "always on", then we can bypass the feature check for ND 4.0.
  • If not, and a new endpoint is available that provides the status of these features, use the new endpoint for ND 4.0.

Potential fixes

  • Disable the feature check for ND 4.0 by wrapping lines 3035-3042 in dcnm_fabric.py in a conditional that tests for ND 3.x.
  • If a new endpoint is available in ND 4.0 that provides the status of these features, use it (again, based on a conditional to discriminate between ND 3.0 and ND 4.0)>.

References

Below are gists containing the ND 3.2.1e vs ND 4.0 output for the following endpoint:

/appcenter/cisco/ndfc/api/v1/fm/features

ND 3.2.1e output

ND 4.0 output

@allenrobel allenrobel self-assigned this Jan 7, 2025
@allenrobel allenrobel added the investigating Under investigation label Jan 7, 2025
@allenrobel allenrobel changed the title dcnm_fabric: ND 4.0 support (part 1 of X) dcnm_fabric: Fix controller feature evaluation and add initial ND 4.0 support Jan 7, 2025
@allenrobel allenrobel linked a pull request Jan 7, 2025 that will close this issue
@allenrobel allenrobel added pr_submitted PR Submitted bug Something isn't working and removed investigating Under investigation labels Jan 8, 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 pr_submitted PR Submitted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant