Skip to content
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

Unable to sync #9

Open
Wh8staffs opened this issue Sep 29, 2022 · 8 comments
Open

Unable to sync #9

Wh8staffs opened this issue Sep 29, 2022 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@Wh8staffs
Copy link

This plugin has been installed but i'm unable to get any details to sync between the two enviroments. I could be missing something simple but I'm struggling to find any clear output on what is broken here.
I get this error:

image

The same shows if I hover over both the site and device sync buttons.

Python version: 3.8.12
NetBox version: 3.2.6
DNA Center version: 2.2.3.5

@Wh8staffs
Copy link
Author

To add to this i have done some more testing and i can successfully sync with the sandbox dna center. but looking that seems to be running on an older version of DNA.

image

@robertcsapo
Copy link
Owner

robertcsapo commented Sep 30, 2022

Could you share the console logs from NetBox as you go to the Status page?

What version of this plugin are you running?

@Wh8staffs
Copy link
Author

Hi Rob, Apologies for the delay I have been OOO.

I am using version 3.2.3:
[root@vmt3unetbox1 bin]# ./pip3 list | grep cisco
ciscodnacnetbox 3.2.3

Here are the console logs:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/netbox-3.2.6/venv/lib64/python3.8/site-packages/django/template/base.py", line 898, in _resolve_lookup
raise VariableDoesNotExist(
django.template.base.VariableDoesNotExist: Failed lookup for key [form] in [{'True': True, 'False': False, 'None': None}, {'csrf_token': <SimpleLazyObject: <function csrf.._get_val at 0x7f776594b430>>, 're: request=<WSGIRequest: GET '/plugins/ciscodnacnetbox/status/'>>, 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'SUCCESS': 25, 'WARNING': 30, 'ERROR': 40}, 'settings': <LazySettings "netbox.settings">, 'coule', 'devicebay', 'consoleserverport', 'region', 'poweroutlet', 'modulebay', 'devicetype', 'powerfeed', 'powerpanel', 'site', 'powerport', 'location', 'interface', 'consoleport', 'manufacturer', 'virtualchassis'{'vlan', 'service', 'vlangroup', 'rir', 'aggregate', 'iprange', 'vrf', 'servicetemplate', 'prefix', 'asn', 'role', 'routetarget', 'fhrpgroup', 'ipaddress'}, 'virtualization': {'clustergroup', 'clustertype', 'vmin<class 'set'>, {'extras': {'journalentry'}, 'dcim': {'rack', 'rackreservation', 'moduletype', 'module', 'devicebay', 'consoleserverport', 'region', 'poweroutlet', 'modulebay', 'devicetype', 'powerfeed', 'powerpanort', 'platform'}, 'circuits': {'circuittype', 'circuit', 'provider', 'providernetwork'}, 'ipam': {'vlan', 'service', 'vlangroup', 'rir', 'aggregate', 'iprange', 'vrf', 'servicetemplate', 'prefix', 'asn', 'role',}, 'wireless': {'wirelesslan', 'wirelesslangroup', 'wirelesslink'}}), 'export_templates': defaultdict(<class 'set'>, {'extras': {'customfield', 'customlink', 'webhook', 'exporttemplate', 'tag'}, 'dcim': {'rack', , 'manufacturer', 'virtualchassis', 'sitegroup', 'rackrole', 'cable', 'devicerole', 'inventoryitemrole', 'inventoryitem', 'frontport', 'device', 'rearport', 'platform'}, 'circuits': {'circuittype', 'circuit', 'prlustergroup', 'clustertype', 'vminterface', 'cluster', 'virtualmachine'}, 'tenancy': {'tenantgroup', 'contactrole', 'tenant', 'contact', 'contactgroup'}, 'wireless': {'wirelesslan', 'wirelesslangroup', 'wirelesslport', 'region', 'poweroutlet', 'modulebay', 'devicetype', 'powerfeed', 'powerpanel', 'site', 'powerport', 'location', 'interface', 'consoleport', 'manufacturer', 'virtualchassis', 'sitegroup', 'rackrole', 'cable'rir', 'aggregate', 'iprange', 'vrf', 'servicetemplate', 'prefix', 'asn', 'role', 'routetarget', 'fhrpgroup', 'ipaddress'}, 'virtualization': {'clustergroup', 'clustertype', 'vminterface', 'cluster', 'virtualmach}, 'dcim': {'rack', 'rackreservation', 'moduletype', 'module', 'devicebay', 'consoleserverport', 'region', 'poweroutlet', 'modulebay', 'devicetype', 'powerfeed', 'powerpanel', 'site', 'powerport', 'location', 'inype', 'circuit', 'provider', 'providernetwork'}, 'ipam': {'vlan', 'service', 'vlangroup', 'rir', 'aggregate', 'iprange', 'vrf', 'servicetemplate', 'prefix', 'asn', 'role', 'routetarget', 'fhrpgroup', 'ipaddress'}angroup', 'wirelesslink'}}), 'webhooks': defaultdict(<class 'set'>, {'extras': {'customfield', 'customlink', 'configcontext', 'webhook', 'exporttemplate', 'tag', 'journalentry', 'imageattachment'}, 'dcim': {'racknel', 'site', 'powerport', 'location', 'consoleserverporttemplate', 'interface', 'consoleport', 'manufacturer', 'virtualchassis', 'consoleporttemplate', 'sitegroup', 'rackrole', 'cable', 'devicebaytemplate', 'devidernetwork', 'circuittermination', 'provider', 'circuittype'}, 'ipam': {'vlan', 'service', 'vlangroup', 'fhrpgroupassignment', 'rir', 'aggregate', 'iprange', 'vrf', 'servicetemplate', 'prefix', 'asn', 'role', 'rt', 'contactgroup'}, 'wireless': {'wirelesslan', 'wirelesslangroup', 'wirelesslink'}})}, 'plugins': {'graphql_schemas': [], 'menu_items': {'Cisco DNA Center Sync Plugin': (<extras.plugins.PluginMenuItem object atces': None, 'api': JSONDecodeError('Expecting value: line 3 column 1 (char 4)')}, 'sandboxdnac.cisco.com': {'id': 3, 'sites': 3, 'devices': 4, 'api': 'success'}}, 'netbox': 'https://10.206.12.5/', 'netbox_sites':e.utc), 'managed': True}}}, {}]
2022-10-10 10:53:18,400 django.template DEBUG: Exception while resolving variable 'form' in template 'ciscodnacnetbox/status.html'.
Traceback (most recent call last):
File "/opt/netbox-3.2.6/venv/lib64/python3.8/site-packages/django/template/base.py", line 875, in _resolve_lookup
current = current[bit]
File "/opt/netbox-3.2.6/venv/lib64/python3.8/site-packages/django/template/context.py", line 83, in getitem
raise KeyError(key)
KeyError: 'form'

@robertcsapo
Copy link
Owner

thanks, i'll try to reproduce this.

@robertcsapo robertcsapo self-assigned this Oct 13, 2022
@robertcsapo robertcsapo added the bug Something isn't working label Oct 13, 2022
@robertcsapo
Copy link
Owner

I haven't been able to reproduce this problem.
The plugin was also tested with Cisco DNA Center version 2.3.4.0

@Wh8staffs
Copy link
Author

Hi rob,
No problem I have done some more digging just and have narrowed the issue down to the domain leading to the proxy rather than the DNA server (a fact I wasn't aware of until just) I can now get them to sync.

However, the sync is missing in about 50% of the devices. We have nearly 1000 devices including access points.
But of that net box only syncs 487. I'm still trying to work out if there are any connections between the missing devices but there are no logs to indicate anything crashed/failed.

@robertcsapo
Copy link
Owner

I'll try to look if there's any pagination needed for 1000 devices

@Wh8staffs
Copy link
Author

Thanks for that!
There doesn't look to be any specific link between the missing devices, i.e. no specific model or location. Just seems to get so far and then stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants