Uploaded image for project: 'Ansible Networking & Security (Content)'
  1. Ansible Networking & Security (Content)
  2. ANA-569

error in gather facts for cisco nxos

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 2.4
    • networking
    • None
    • Networking Sprint 17
    • Moderate

      Detailed Description

      When CIsco NXOS gathers facts, it runs the following:

       as_number = connection.get("show running-config bgp | include 'router bgp'")
       templates = connection.get("show running-config bgp | section 'template '")

       

      This ends up returning an invalid command error when bgp is disabled on the device.  Customer has worked around the issue by changing the code to:

      as_number = connection.get("show running-config | include 'router bgp'")
      templates = connection.get("show running-config | section 'template peer '")

       

      The gather facts should be smart enough to not gather facts on things that are disabled.

       

      Component Versions:

      ansible-core: v2.15.8
      cisco.nxos: v9.1.0
      python: v3.9.6

       

      Steps to Reproduce

      Disable bgp on a cisco device and gather facts. 

       

      Actual Behavior

      Gather facts return invalid command errors from device

       

      Expected Behavior

      Gather Facts should not try gathering facts for a disabled feature.

              nchakrab@redhat.com Nilashish Chakraborty
              rhn-support-gscarbor Gary Scarborough
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: