exception after plugin install
ThomasADavis opened this issue · 7 comments
Plugin version
latest from pypy
NetBox version
v3.2.1
Python version
3.9
Steps to Reproduce
- add to local_requirements.
- add to netbox/netbox/configuration.py
- run upgrade
- systemctl restart netbox netbox-rq
- click on plugin link to get error.
Expected Behavior
No error.
Observed Behavior
<class 'django.db.utils.ProgrammingError'>
relation "netbox_routing_staticroute" does not exist
LINE 1: SELECT COUNT(*) AS "__count" FROM "netbox_routing_staticrout...
^
Python version: 3.10.4
NetBox version: 3.2.1
Did you run migrations?
Operations to perform:
Apply all migrations: admin, auth, circuits, contenttypes, dcim, django_rq, extras, ipam, nb_service, netbox_bgp, netbox_dns, netbox_evpn_vc, netbox_gateways, netbox_slm, sessions, social_django, taggit, tenancy, users, virtualization, wireless
Running migrations:
No migrations to apply.```
it's in local_requirements, it's in the PLUGINS array..
still no migrations are being ran for it..
Apply all migrations: admin, auth, circuits, contenttypes, dcim, django_rq, extras, ipam, nb_service, netbox_bgp, netbox_dns, netbox_evpn_vc, netbox_gateways, netbox_slm, sessions, social_django, taggit, tenancy, users, virtualization, wireless
I don't see it in this list here, which means it isn't getting loaded.
If you run nbshell, are there any errors thrown (you might need to enable logging to console, not sure)?
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
[X] 0003_logentry_add_action_flag_choices
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
[X] 0009_alter_user_last_name_max_length
[X] 0010_alter_group_name_max_length
[X] 0011_update_proxy_permissions
[X] 0012_alter_user_first_name_max_length
circuits
[X] 0001_squashed (1 squashed migrations)
[X] 0002_squashed_0029 (28 squashed migrations)
[X] 0003_extend_tag_support
[X] 0004_rename_cable_peer
[X] 0032_provider_service_id
[X] 0033_standardize_id_fields
[X] 0034_created_datetimefield
[X] 0035_provider_asns
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
dcim
[X] 0001_squashed (1 squashed migrations)
[X] 0002_squashed (1 squashed migrations)
[X] 0003_squashed_0130 (129 squashed migrations)
[X] 0131_consoleport_speed
[X] 0132_cable_length
[X] 0133_port_colors
[X] 0134_interface_wwn_bridge
[X] 0135_tenancy_extensions
[X] 0136_device_airflow
[X] 0137_relax_uniqueness_constraints
[X] 0138_extend_tag_support
[X] 0139_rename_cable_peer
[X] 0140_wireless
[X] 0141_asn_model
[X] 0142_rename_128gfc_qsfp28
[X] 0143_remove_primary_for_related_name
[X] 0144_fix_cable_abs_length
[X] 0145_site_remove_deprecated_fields
[X] 0146_modules
[X] 0147_inventoryitemrole
[X] 0148_inventoryitem_component
[X] 0149_inventoryitem_templates
[X] 0150_interface_vrf
[X] 0151_interface_speed_duplex
[X] 0152_standardize_id_fields
[X] 0153_created_datetimefield
django_rq
[X] 0001_initial
extras
[X] 0001_squashed (1 squashed migrations)
[X] 0002_squashed_0059 (58 squashed migrations)
[X] 0060_customlink_button_class
[X] 0061_extras_change_logging
[X] 0062_clear_secrets_changelog
[X] 0063_webhook_conditions
[X] 0064_configrevision
[X] 0065_imageattachment_change_logging
[X] 0066_customfield_name_validation
[X] 0067_customfield_min_max_values
[X] 0068_configcontext_cluster_types
[X] 0069_custom_object_field
[X] 0070_customlink_enabled
[X] 0071_standardize_id_fields
[X] 0072_created_datetimefield
[X] 0073_journalentry_tags_custom_fields
ipam
[X] 0001_squashed (1 squashed migrations)
[X] 0002_squashed_0046 (45 squashed migrations)
[X] 0047_prefix_depth_children
[X] 0048_prefix_populate_depth_children
[X] 0049_prefix_mark_utilized
[X] 0050_iprange
[X] 0051_extend_tag_support
[X] 0052_fhrpgroup
[X] 0053_asn_model
[X] 0054_vlangroup_min_max_vids
[X] 0055_servicetemplate
[X] 0056_standardize_id_fields
[X] 0057_created_datetimefield
nb_service
[X] 0001_initial
netbox_bgp
[X] 0001_initial
[X] 0002_netbox_bgp
[X] 0003_netbox_bgp
[X] 0004_netbox_bgp
[X] 0005_netbox_bgp
[X] 0006_netbox_bgp
[X] 0007_netbox_bgp
[X] 0008_netbox_bgp
[X] 0009_netbox_bgp
[X] 0010_netbox_bgp
[X] 0011_netbox_bgp
[X] 0012_netbox_bgp
[X] 0013_netbox_bgp
[X] 0014_netbox_bgp
[X] 0015_netbox_bgp
[X] 0016_netbox_bgp
[X] 0017_netbox_bgp
[X] 0018_netbox_bgp
[X] 0019_netbox_bgp
[X] 0020_netbox_bgp
[X] 0021_netbox32_support
netbox_dns
[X] 0001_initial
[X] 0002_zone_default_ttl
[X] 0003_soa_managed_records
[X] 0004_create_ptr_for_a_aaaa_records
[X] 0006_zone_soa_serial_auto
[X] 0007_alter_zone_soa_serial_auto
[X] 0005_update_ns_records
[X] 0008_zone_status_names
[X] 0009_netbox32
[X] 0010_update_soa_records
netbox_evpn_vc
[X] 0001_initial
[X] 0002_vc_constrain
netbox_gateways
[X] 0001_netbox_gateways
netbox_ipcalculator
(no migrations)
netbox_slm
[X] 0001_initial
[X] 0002_alter_softwareproduct_manufacturer
[X] 0003_auto_20220407_1209
[X] 0004_auto_20220415_0705
sessions
[X] 0001_initial
social_django
[X] 0001_initial (2 squashed migrations)
[X] 0002_add_related_name (2 squashed migrations)
[X] 0003_alter_email_max_length (2 squashed migrations)
[X] 0004_auto_20160423_0400 (2 squashed migrations)
[X] 0005_auto_20160727_2333 (1 squashed migrations)
[X] 0006_partial
[X] 0007_code_timestamp
[X] 0008_partial_timestamp
[X] 0009_auto_20191118_0520
[X] 0010_uid_db_index
taggit
[X] 0001_initial
[X] 0002_auto_20150616_2121
[X] 0003_taggeditem_add_unique_index
[X] 0004_alter_taggeditem_content_type_alter_taggeditem_tag
tenancy
[X] 0001_squashed_0012 (12 squashed migrations)
[X] 0002_tenant_ordering
[X] 0003_contacts
[X] 0004_extend_tag_support
[X] 0005_standardize_id_fields
[X] 0006_created_datetimefield
[X] 0007_contact_link
users
[X] 0001_squashed_0011 (11 squashed migrations)
[X] 0002_standardize_id_fields
virtualization
[X] 0001_squashed_0022 (22 squashed migrations)
[X] 0023_virtualmachine_natural_ordering
[X] 0024_cluster_relax_uniqueness
[X] 0025_extend_tag_support
[X] 0026_vminterface_bridge
[X] 0027_standardize_id_fields
[X] 0028_vminterface_vrf
[X] 0029_created_datetimefield
wireless
[X] 0001_wireless
[X] 0002_standardize_id_fields
[X] 0003_created_datetimefield
I'll have to look up nbshell to do it.. but something is wrong, but what I don't know. This is a dev system, for exactly doing this - break it and not the production system. :)
Can you try this latest version?
hmm..
netbox-v3.5.1, and verify it's the v0.03 release.. aka from the container build:
Collecting netbox-routing (from -r /plugin_requirements.txt (line 17))
Downloading netbox_routing-0.0.3-py3-none-any.whl (35 kB)
from the pod/container deploy:
[root@dev-k3s-1 netbox]# kubectl logs -n netbox netbox-7556f7849b-js2ff -f
Defaulted container "netbox" out of: netbox, init-dirs (init)
⚙️ Applying database migrations
🧬 loaded config '/etc/netbox/config/configuration.py'
🧬 loaded config '/etc/netbox/config/extra.py'
🧬 loaded config '/etc/netbox/config/logging.py'
🧬 loaded config '/etc/netbox/config/plugins.py'
Operations to perform:
Apply all migrations: admin, auth, circuits, contenttypes, core, dcim, django_rq, extras, ipam, netbox_dns, netbox_gateways, netbox_kea, netbox_routing, sessions, social_django, taggit, tenancy, users, virtualization, wireless
Running migrations:
Applying netbox_routing.0001_initial... OK
Applying netbox_routing.0002_netboxmodel_updates... OK
Applying netbox_routing.0003_model_ordering_and_constraints... OK
Applying netbox_routing.0004_alter_prefixlistentry_ge_alter_prefixlistentry_le... OK
⚙️ Running trace_paths
it shows up and appears to work fine in the browser.
It seems like you fixed this, at least from what I can see.
Going to close this out.