Skip to content

Trying to lift and shift a network attachment to an access interface fails #691

@peter8498

Description

@peter8498

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

Create a VLAN and attach it to an ACCESS interface (in example below Eth1/17 is access):

- name: Merge networks
  cisco.dcnm.dcnm_network:
    fabric: nac-ndfc1
    state: replaced
    config:
      - net_name: ansible-net14
        vrf_name: NaC-VRF01
        net_id: 7006
        net_template: Default_Network_Universal
        net_extension_template: Default_Network_Extension_Universal
        vlan_id: 151
        gw_ip_subnet: '192.168.31.1/24'
        attach: []
        deploy: false
      - net_name: ansible-net13
        vrf_name: NaC-VRF01
        net_id: 7005
        net_template: Default_Network_Universal
        net_extension_template: Default_Network_Extension_Universal
        vlan_id: 150
        gw_ip_subnet: '192.168.30.1/24'
        attach:
          - ip_address: 10.1.1.11
            ports: [Ethernet1/17]
          - ip_address: 10.1.1.12
        deploy: false

This runs with no error.

Then life and shift Eth1/17 to other vlan:

- name: Merge networks
  cisco.dcnm.dcnm_network:
    fabric: nac-ndfc1
    state: replaced
    config:
      - net_name: ansible-net14
        vrf_name: NaC-VRF01
        net_id: 7006
        net_template: Default_Network_Universal
        net_extension_template: Default_Network_Extension_Universal
        vlan_id: 151
        gw_ip_subnet: '192.168.31.1/24'
        attach:
          - ip_address: 10.1.1.11
            ports: [Ethernet1/17]
          - ip_address: 10.1.1.12
        deploy: false
      - net_name: ansible-net13
        vrf_name: NaC-VRF01
        net_id: 7005
        net_template: Default_Network_Universal
        net_extension_template: Default_Network_Extension_Universal
        vlan_id: 150
        gw_ip_subnet: '192.168.30.1/24'
        attach: []
        deploy: false

This fails with the following error:

fatal: [xxx-pod1]: FAILED! => {"changed": false, "msg": {"DATA": {"ansible-net13-[xxxxxxxxx/LEAF1]": "Invalid Interfaces in LEAF1. Invalid interfaces are Ethernet1/17.", "ansible-net14-[xxxxxxxxx/LEAF2]-[xxxxxxxxx/LEAF1]": "SUCCESS Peer attach Response - SUCCESS"}, "MESSAGE": "OK", "METHOD": "POST", "REQUEST_PATH": "https://xx.xxx.:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/top-down/fabrics/nac-ndfc1/networks/attachments", "RETURN_CODE": 200, "ROLLBACK_RESULT": "SUCCESS - Attempted rollback of the task has succeeded"}}

Ansible Version and collection version

2.16

DCNM version

4.1

Affected module(s)

  • dcnm_network

Ansible Playbook

As above

Debug Output

As above

Expected Behavior

The module should allow for the lift and shift. Potentially it should deattach first and then attach to the new network.

Actual Behavior

See the above error

Steps to Reproduce

As above

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions