last person joined: 16 hours ago 

Expand all | Collapse all

aoscx_vlan slow loop

This thread has been viewed 9 times
  • 1.  aoscx_vlan slow loop

    Posted Feb 16, 2021 10:09 AM
    Hi all,

    I have been working with the AOS-CX role for a while and decided to see if I could improve the speed of administration of  VLANs with aoscx_vlan.  Currently I am have them all in a vars file like:

      - {vlanid'4'vlanname'vlan0004'vlanadminstate'up'vlanstate'create'}
      - {vlanid'8'vlanname'vlan0008'vlanadminstate'up'vlanstate'create'}
      - {vlanid: '399', vlanname: 'vlan4000', vlanstate: 'delete'}
      - {vlanid: '4000', vlanname: 'vlan4000', vlanadminstate: 'up', vlanstate: 'create'}

    and the task is:

      - name: Create VLANs
          vlan_id"{{ item.vlanid }}"
          name"{{ item.vlanname }}"
          admin_state"{{ item.vlanadminstate | default(omit)  }}"
          state"{{ item.vlanstate }}"
        loop"{{ vlans | flatten (levels=1) }}"

    My vars file has about 80 vlans defined and takes about 50 seconds per switch to run. Not terrible, but you can see where this will be a bottleneck once getting past a handful of switches.

    I did a bit of research and found a few Ansible config changes to try, it saved about 1 second off the time. Found other suggestions that were module specific which the aoscx_vlan module does not support, aggregate (eos module), src + jinja template (nxos module). 

    Any suggestions to improve this workflow?

    Don Rhodes

  • 2.  RE: aoscx_vlan slow loop

    Posted Feb 16, 2021 10:48 AM
    Hi Don,

    I think, it is better to ask directly on Ansible AOS CX github

    What latency do you have to the switch ? (on the same LAN ?)
    do you have look log to see what it is make ?

    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281

  • 3.  RE: aoscx_vlan slow loop

    Posted Feb 22, 2021 07:16 AM
    Typical latency is ~0.4ms.  For a log, are you talking about a -vvvv output or a log from the switch?

    Don Rhodes