ansible-dcnm icon indicating copy to clipboard operation
ansible-dcnm copied to clipboard

Timeout triggered when adding many interfaces

Open tias77 opened this issue 3 years ago • 6 comments

Creating one or two vPC interfaces is no problem. Adding 40+ seems to be working looking at interfaces in DCNM webui, but ansible triggers timeout. Rerunning the same task works fine. I'll add more data as I find it.

tias77 avatar Apr 19 '21 09:04 tias77

I see no effect using:

[persistent_connection]
connect_timeout = 480
command_timeout = 480

in ansible.cfg

tias77 avatar Apr 19 '21 12:04 tias77

@tias77 Thanks for opening the issue. We are investigating and will reply back soon.

mikewiebe avatar Apr 19 '21 16:04 mikewiebe

@tias77 do you mind share your playbook of creating vpc part? we have seen a similar issue when creating too many networks at the same time, one of the ways to ease it is to create them in batch, of course, it will slow down the whole play.

dsx1123 avatar Apr 19 '21 19:04 dsx1123

Sure, here's my playbook:

---

- hosts: dcnm_controllers
  gather_facts: false
  connection: ansible.netcommon.httpapi

  tasks:
    - name: Create vPC interfaces
      cisco.dcnm.dcnm_interface: &vpc_merge
        fabric: fabric1
        state: replaced                         # only choose from [merged, replaced, deleted, overridden, query]
        config:
          - name: vpc1
            type: vpc
            switch:
              - "le1"
              - "le3"
            deploy: true                       # choose from [true, false]
            profile:
              admin_state: true                ## choose from [true, false]
              mode: trunk                      # choose from [trunk, access]
              peer1_members:                   ## member interfaces on peer 1
                - e1/1
              peer2_members:                   ## member interfaces on peer 2
                - e1/1
              pc_mode: 'active'                ## choose from ['on', 'active', 'passive']
              bpdu_guard: true                 ## choose from [true, false, 'no']
              port_type_fast: true             ## choose from [true, false]
              mtu: jumbo                       ## choose from [default, jumbo]
              peer1_description: "VPC acting as trunk peer1 - modified"
              peer2_description: "VPC acting as trunk peer2 - modified"

and then repeat that for all 48 interfaces

tias77 avatar Apr 20 '21 06:04 tias77

this might not be efficient but don't suppose you'd be willing to add:

- 
  name: "Sleep for 3 seconds and timeout"
  tags: sleep3
  wait_for: 
    delay: 3
    timeout: 0

this will just introduce a 3 sec delay before running the next task that way if needed.

micruzz82 avatar Apr 20 '21 07:04 micruzz82

@tias77

I tried increasing the timeout to a higher value and it worked. Can you please try increasing the timeout value to around 1 hour and retry. Adding these many VPCs may take time due to deploy operations from DCNM.

mmudigon avatar Apr 27 '21 13:04 mmudigon