-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config Compliance's status is Diff, but no diff is actually displayed. #83
Comments
I think I had a similar issue. There is some text within the files that the diff parser doesn't like. |
Hi @mathieumd, thanks for opening the issue please, provide your rendered and actual config (without sensitive info), so I can check the plugin with your data |
Here you are: rendered
actual
diff10c10,11
< #vlan batch
---
> vlan batch 1 2 3 4 5 6 7 8 9 10
> vlan batch 11 12 13
36c37,44
< #
---
> vlan 1
> description VLAN_1
> name VLAN_1
> vlan 2
> [...]
> vlan 13
> description VLAN_13
> name VLAN_13
49c57
< undo password alert original
---
> undo password alert original
57a66
> local-user user password irreversible-cipher [...]
59a69,72
> local-user user2 password irreversible-cipher [...]
> local-user user2 privilege level 15
> local-user user2 service-type terminal ssh http
> local-user user3 password irreversible-cipher [...]
62c75,88
< ip address 10.0.0.5/24 255.255.255.0
---
> local-user user4 password irreversible-cipher [...]
> local-user user4 privilege level 15
> local-user user4 service-type terminal ssh http
> #
> ntp-service server disable
> ntp-service ipv6 server disable
> ntp-service unicast-server 10.0.0.2
> ntp-service unicast-server 10.0.0.3
> #
> interface Vlanif1
> #
> interface MEth0/0/1
> description => SwitchExample
> ip address 10.0.0.5 255.255.255.0
77a104
> snmp-agent local-engineid 800007DB036413AB283B81
83a111,112
> snmp-agent usm-user v3 user5 authentication-mode sha cipher [...]
> snmp-agent usm-user v3 user5 privacy-mode aes128 cipher [...] |
@mathieumd thanks for the data! I've tested with your data and I've got rendered diff. It may be a problem with the sensitive data that you strip. Please send me the API response with your Config Compliance object; it will have a raw diff, so I can check its correctness. |
Here it is: {
"id": 1,
"url": "https://netbox.example.com/api/plugins/config-diff/config-compliances/1/",
"display": "EXAMPLE",
"device": {
"id": 7,
"url": "https://netbox.example.com/api/dcim/devices/7/",
"display_url": "https://netbox.example.com/dcim/devices/7/",
"display": "EXAMPLE",
"name": "EXAMPLE"
},
"status": {
"value": "diff",
"label": "Diff"
},
"error": "",
"diff": "--- \tEXAMPLE\n+++ \tEXAMPLE\n@@ -1,3 +1,4 @@\n+!Software Version V200R022C00SPC500\n #\n sysname EXAMPLE\n #\n@@ -6,8 +7,7 @@\n dns server 10.0.0.11\n dns domain example.com\n #\n-\n-\n+#vlan batch\n #\n authentication-profile name default_authen_profile\n authentication-profile name dot1x_authen_profile\n@@ -33,45 +33,7 @@\n #\n drop-profile default\n #\n-vlan 1\n- description VLAN_1\n- name VLAN_1\n-vlan 2\n-[...]\n-vlan 13\n- description VLAN_13\n- name VLAN_13\n+#\n #\n aaa\n authentication-scheme default\n@@ -84,7 +46,7 @@\n accounting-mode none\n local-aaa-user password policy administrator\n password history record number 0\n- undo password alert original\n+ undo password alert original \n password expire 0\n domain default\n authentication-scheme radius\n@@ -93,29 +55,11 @@\n domain default_admin\n authentication-scheme default\n accounting-scheme default\n- local-user user password irreversible-cipher $1c$mNK[...]\n local-user user privilege level 1\n local-user user service-type terminal ssh http\n- local-user user2 password irreversible-cipher $1c$a2K[...]\n- local-user user2 privilege level 15\n- local-user user2 service-type terminal ssh http\n- local-user user3 password irreversible-cipher $1c$KhV[...]\n local-user user3 privilege level 15\n local-user user3 service-type terminal ssh http\n- local-user user4 password irreversible-cipher $1c$hA%[...]\n- local-user user4 privilege level 15\n- local-user user4 service-type terminal ssh http\n-#\n-ntp-service server disable\n-ntp-service ipv6 server disable\n-ntp-service unicast-server 10.0.0.2\n-ntp-service unicast-server 10.0.0.3\n-#\n-interface Vlanif1\n-#\n-interface MEth0/0/1\n- description => SwitchExample\n- ip address 10.0.0.5 255.255.255.0\n+ ip address 10.0.0.5/24 255.255.255.0\n #\n interface XGigabitEthernet0/0/1\n description EXAMPLE1\n@@ -283,15 +227,12 @@\n ip route-static 0.0.0.0 0.0.0.0 10.0.0.8\n #\n snmp-agent\n-snmp-agent local-engineid 800007DB036413AB283B81\n snmp-agent sys-info contact EXAMPLE\n snmp-agent sys-info location EX1\n snmp-agent sys-info version v3\n snmp-agent group v3 ReadOnly privacy\n snmp-agent usm-user v3 user5\n snmp-agent usm-user v3 user5 group ReadOnly\n-snmp-agent usm-user v3 user5 authentication-mode sha cipher %^%#{[...]\n-snmp-agent usm-user v3 user5 privacy-mode aes128 cipher %^%#O[...]\n undo snmp-agent protocol source-status all-interface\n snmp-agent protocol source-interface MEth0/0/1\n undo snmp-agent protocol source-status ipv6 all-interface",
"rendered_config": "[...]",
"actual_config": "[...]",
"patch": "[...]",
"missing": "",
"extra": "",
"created": "2024-10-22T09:05:43.932322+02:00",
"last_updated": "2024-10-22T10:45:19.542663+02:00"
} I still replaced sensitive values, though, of course. Maybe it's caused by |
NetBox version
v4.1.3
Describe the bug
Although the Config Compliance has a Status of "Diff" (both "Rendered Config" and "Actual Config" are retrieved correctly, with actual differences), the Diff table below is empty:
To Reproduce
Steps to reproduce the behavior:
Am I misunderstanding something?
The text was updated successfully, but these errors were encountered: