networktocode / ntc-netbox-plugin-onboarding

A plugin for NetBox to easily onboard new devices.
Other
246 stars 46 forks source link

Onboarding device fails with "create_management_interface_if_missing" #73

Closed misch42 closed 4 years ago

misch42 commented 4 years ago

Environment

After upgrading the onboarding plugin onboarding a new device fails with "create_management_interface_if_missing". Device is created but the management interface is missing.

For this switch I do not have a dedicated management interface but I use inline management of VLAN10.

With verison 1.1.0 of the pluging onboarding created the VLAN10 as the management interface correctly. After upgrade to version 1.2 he device is created but no interface for that device is generated.

Steps to Reproduce

  1. Upgrade the onboarding pluging from 1.1.0 to 1.2.0
  2. onboard a device with site and IP address
  3. wait for the error.
  4. Device is created, but without interface.

Expected Behavior

Device being created with the VLAN10 interface.

Observed Behavior

Device created without the interface.

dgarros commented 4 years ago

@jvanderaa please can you check this one ?

jvanderaa commented 4 years ago

I'm not able to reproduce with the process.

@misch42 can you do a couple of checks?

First, can you restart both netbox and netbox-rq services?

sudo systemctl restart netbox netbox-rq

If that is still an issue can you do the following from within the venv:

cd /opt/netbox/netbox/
python manage.py nbshell

Inside of the shell issue:

from django.conf import settings
settings.PLUGINS_CONFIG

Provide the output from the settings.PLUGINS_CONFIG.

misch42 commented 4 years ago
# python manage.py nbshell
### NetBox interactive shell (netbox.schwartzkopff.org)
### Python 3.6.8 | Django 3.0.7 | NetBox 2.8.7
### lsmodels() will show available models. Use help(<model>) for more info.
>>> from django.conf import settings
>>> settings.PLUGINS_CONFIG
{'netbox_onboarding': {'default_device_status': 'staged', 'create_platform_if_missing': True, 'create_manufacturer_if_missing': True, 'create_device_type_if_missing': True, 'create_device_role_if_missing': True, 'default_device_role': 'network', 'default_device_role_color': 'FF0000', 'default_management_interface': 'PLACEHOLDER', 'default_management_prefix_length': 0, 'create_management_interface_if_missing': True, 'platform_map': {}}, 'nextbox_ui_plugin': {'INITIAL_LAYOUT': 'auto'}}
jvanderaa commented 4 years ago

Does the issue persist through the restart of the netbox-rq service at this point?

I have gone through the full process including starting at 1.1 release and it is showing in a good status.

misch42 commented 4 years ago

After restart of netbox-rq issue was gone.