netbox-community / netbox-bgp

NetBox plugin for BGP related objects documentation
Apache License 2.0
251 stars 52 forks source link

Application Labels Arent Unique #211

Closed NetTech2001 closed 1 month ago

NetTech2001 commented 1 month ago

NetBox version 4.1.2

Describe the bug Error when building Netbox Dcoker container with both Netbox Inventory and Netbox BGP loaded. Removing Netbox BGP allows the system to load with the inventory plugin as expected.

To Reproduce Steps to reproduce the behavior: Load both the Netbox Inventory and the Netbox BGP plugins at the same time.

Expected behavior Both plugins should load

Screenshots => ERROR [netbox 5/5] RUN SECRET_KEY="_read_secret('secret_key', environ.get('SECRET_KEY', ''))" /opt/netbox/venv/bin/python3 manage.py collectstatic --no-input 2.7s

[netbox 5/5] RUN SECRET_KEY="_read_secret('secret_key', environ.get('SECRET_KEY', ''))" /opt/netbox/venv/bin/python3 manage.py collectstatic --no-input: 2.106 Traceback (most recent call last): 2.106 File "/opt/netbox/netbox/manage.py", line 10, in 2.106 🧬 loaded config '/etc/netbox/config/configuration.py' 2.106 🧬 loaded config '/etc/netbox/config/extra.py' 2.106 🧬 loaded config '/etc/netbox/config/load_plugin.py' 2.106 🧬 loaded config '/etc/netbox/config/logging.py' 2.106 🧬 loaded config '/etc/netbox/config/plugins.py' 2.107 execute_from_command_line(sys.argv) 2.107 File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line 2.107 utility.execute() 2.107 File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/init.py", line 416, in execute 2.107 django.setup() 2.107 File "/opt/netbox/venv/lib/python3.12/site-packages/django/init.py", line 24, in setup 2.107 apps.populate(settings.INSTALLED_APPS) 2.107 File "/opt/netbox/venv/lib/python3.12/site-packages/django/apps/registry.py", line 93, in populate 2.107 raise ImproperlyConfigured( 2.107 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_inventory

failed to solve: process "/bin/sh -c SECRET_KEY=\"_read_secret('secret_key', environ.get('SECRET_KEY', ''))\" /opt/netbox/venv/bin/python3 manage.py collectstatic --no-input" did not complete successfully: exit code: 1

cruse1977 commented 1 month ago

Expected behavior Both plugins should load

neither plugin has a netbox 4.1 release, as described in both plugins Git and PyPi readme, hence expected behaviour is both plugins should not load. There is a max version set to specifically prevent certainly bgp from loading so minor / major releases can be tested.

I've removed the label as this isn't a bug, its expected behaviour but perhaps not with that error.

The duplicate application labels I've seen elsewhere and appears specific to docker and specific to folks trying to run plugins whereas the plugin doesn't support the netbox version OR where they have multiple "PLUGIN=" lines in the configuration rather than a list OR whereas they try to upgrade with plugins. When there are compatible versions I'd comment out plugins, do an upgrade, then re-instate. There's no correlation or reference to inventory within bgp.