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: (ND 4.0) replaced-state integration tests are failing #363

Open
allenrobel opened this issue Jan 8, 2025 · 0 comments
Open
Assignees
Labels
investigating Under investigation

Comments

@allenrobel
Copy link
Collaborator

allenrobel commented Jan 8, 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

DCNM version

  • V 3.6.0

Affected module(s)

  • dcnm_fabric

Ansible Playbook

- name: REPLACED - SETUP - Delete fabric_1
  cisco.dcnm.dcnm_fabric:
    state: deleted
    config:
      - FABRIC_NAME: VXLAN_EVPN_Fabric
  register: result
- debug:
    var: result

- name: REPLACED - TEST - Create fabric_name_1 with non-default config + SITE_ID
  cisco.dcnm.dcnm_fabric:
    state: merged
    config:
      - FABRIC_NAME: VXLAN_EVPN_Fabric
        FABRIC_TYPE: VXLAN_EVPN
        ADVERTISE_PIP_BGP: true
        ANYCAST_GW_MAC: 00:aa:bb:cc:dd:ee
        BGP_AS: 65535
        REPLICATION_MODE: Ingress
        SITE_ID: 65000
        UNDERLAY_IS_V6: false
        DEPLOY: false
  register: result
- debug:
    var: result

- name: REPLACED - TEST - Replace config for fabric_1 with default config
  cisco.dcnm.dcnm_fabric: &replace_fabric_1
    state: replaced
    config:
      - FABRIC_NAME: VXLAN_EVPN_Fabric
        FABRIC_TYPE: VXLAN_EVPN
        BGP_AS: 65535
        DEPLOY: false
  register: result
- debug:
    var: result

Debug Output

See also Initial Analysis at the bottom of this issue.

TASK [dcnm_fabric : REPLACED - TEST - Replace config for fabric_1 with default config] *****************************************************************************
fatal: [172.22.150.244]: FAILED! => {"changed": false, "metadata": [{"action": "fabric_replace", "check_mode": false, "sequence_number": 1, "state": "replaced"}], "msg": "Module failed.", "response": [{"DATA": "Invalid JSON response: Error in validating provided name value pair: [ANYCAST_RP_IP_RANGE, MULTICAST_GROUP_SUBNET, RP_LB_ID]", "MESSAGE": "Internal Server Error", "METHOD": "PUT", "REQUEST_PATH": "https://172.22.150.244:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics/VXLAN_EVPN_Fabric/Easy_Fabric", "RETURN_CODE": 500, "sequence_number": 1}], "result": [{"changed": false, "sequence_number": 1, "success": false}]}

Expected Behavior

The playbook should succeed when run against ND 4.0.

Actual Behavior

The playbook fails with the error above with ND 4.0 (the playbook succeeds with ND 3.2.1e).

Steps to Reproduce

  1. Install ND 4.0 (v4.0.0.86)
  2. Run the provided playbook.

References

Initial Analysis

The playbook initially sets the fabric REPLICATION_MODE to Ingress.

The playbook then attempts to replace the fabric config with a default config (by not specifying any parameters).

The module creates the replaced-state payload based on the Easy_Fabric template retrieved from the controller. This changes the fabric REPLICATION_MODE to Multicast.

{
    "ADVERTISE_PIP_BGP": "false",
    "ANYCAST_GW_MAC": "2020.0000.00aa",
    "FABRIC_NAME": "VXLAN_EVPN_Fabric",
    "REPLICATION_MODE": "Multicast",
    "SITE_ID": "65535"
}

This results in the 500 error.

Below are debugs for the three parameters mentioned in the error.

The error is due to the payload not containing required parameters for Multicast replication mode.

Since the payload is based on the Easy_Fabric template parameter descriptions, and this is passing for ND 3.2.1e, we need to investigate what has changed in the template.

ANYCAST_RP_IP_RANGE

2025-01-08 10:54:47,042 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.287] parameter: ANYCAST_RP_IP_RANGE, controller_value: , type: <class 'str'>
2025-01-08 10:54:47,043 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.310] parameter: ANYCAST_RP_IP_RANGE, user_value: None, type: <class 'NoneType'>
2025-01-08 10:54:47,043 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.315] parameter: ANYCAST_RP_IP_RANGE, default_value: 10.254.254.0/24, type: <class 'str'>

MULTICAST_GROUP_SUBNET

2025-01-08 10:54:47,590 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.287] parameter: MULTICAST_GROUP_SUBNET, controller_value: , type: <class 'str'>
2025-01-08 10:54:47,591 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.310] parameter: MULTICAST_GROUP_SUBNET, user_value: None, type: <class 'NoneType'>
2025-01-08 10:54:47,591 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.315] parameter: MULTICAST_GROUP_SUBNET, default_value: 239.1.1.0/25, type: <class 'str'>

RP_LB_ID

2025-01-08 10:54:47,352 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.287] parameter: RP_LB_ID, controller_value: , type: <class 'str'>
2025-01-08 10:54:47,353 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.310] parameter: RP_LB_ID, user_value: None, type: <class 'NoneType'>
2025-01-08 10:54:47,353 - DEBUG - [dcnm.FabricReplacedBulk._fabric_needs_update_for_replaced_state.315] parameter: RP_LB_ID, default_value: 254, type: <class 'str'>

TODO: Compare the above with a log from ND 3.2.1e.

@allenrobel allenrobel self-assigned this Jan 8, 2025
@allenrobel allenrobel added the investigating Under investigation label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Under investigation
Projects
None yet
Development

No branches or pull requests

1 participant