nautobot-app-golden-config icon indicating copy to clipboard operation
nautobot-app-golden-config copied to clipboard

Incorrect lines showing up in configuration compliance results

Open alhogan opened this issue 5 months ago • 0 comments

When running configuration compliance on Cisco IOS devices, a config line that does not match the compliance rules is captured in the Intended Config and Actual Config.

Environment

  • Python version: 3.10
  • Nautobot version: 1.6.2-1.6.10
  • nautobot-golden-config version: 1.6.3-1.6.4
  • netutils version: 1.5.0-1.6.0

Expected Behavior

Configuration lines:

logging facility local6
logging source-interface Loopback0
logging host 10.9.31.55
logging host 10.180.220.5 transport udp port 58512
access-list 93 remark Admin ACL Golden Template Version
access-list 93 remark Cisco.V-044.01-18-19
access-list 93 permit 10.50.42.0 0.255.255.255
access-list 93 permit 172.18.172.0 0.15.255.255
access-list 93 permit 192.168.187.0 0.0.255.255
access-list 93 permit 154.23.40.0 0.0.255.255
access-list 93 permit 14.27.216.0 0.0.255.255
access-list 93 remark Admin ACL Golden Template Version
access-list 93 remark Cisco.V-046.04-26-19 
access-list 93 deny any log

Match rules:

logging host

Results:

logging host 10.9.31.55
logging host 10.180.220.5 transport udp port 58512

Observed Behavior

Results:

logging host 10.9.31.55
logging host 10.180.220.5 transport udp port 58512
access-list 93 remark Admin ACL Golden Template Version

Through iterative troubleshooting, we determined that if a matched line is followed by a line that has a duplicate, such as access-list 93 remark Admin ACL Golden Template Version, then the line following the matched line is returned as a matched line as well.

Steps to Reproduce

  1. Create a match rule that should match a line that is followed by a line that has a duplicate.
  2. Run configuration compliance on a Cisco IOS device with a similar configuration as above.

alhogan avatar Jan 22 '24 17:01 alhogan