-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
status: revisions neededThis issue requires additional information to be actionableThis issue requires additional information to be actionabletype: bug
Milestone
Description
Plugin Version
0.1.0
NetBox Version
4.3.3
Python Version
3.12
Steps to Reproduce
installed the python module
((venv) ) [root@ip-10-0-1-106 netbox]# pip install netboxlabs_netbox_custom_objects
Requirement already satisfied: netboxlabs_netbox_custom_objects in ./venv/lib64/python3.12/site-packages (0.1.0)
Requirement already satisfied: Django in ./venv/lib64/python3.12/site-packages (from netboxlabs_netbox_custom_objects) (5.2.3)
Requirement already satisfied: asgiref>=3.8.1 in ./venv/lib64/python3.12/site-packages (from Django->netboxlabs_netbox_custom_objects) (3.8.1)
Requirement already satisfied: sqlparse>=0.3.1 in ./venv/lib64/python3.12/site-packages (from Django->netboxlabs_netbox_custom_objects) (0.5.3)
((venv) ) [root@ip-10-0-1-106 netbox]# pip freeze | grep custom
netboxlabs-netbox-custom-objects==0.1.0
added the plugin to configuration.py
((venv) ) [root@ip-10-0-1-106 netbox]# grep PLUGIN netbox/netbox/configuration.py
PLUGINS = ['netbox_custom_objects']
ran manage.py migrate
(see below)
Expected Behavior
netbox starts with custom objects installed
Observed Behavior
((venv) ) [root@ip-10-0-1-106 netbox]# ./netbox/manage.py migrate
Operations to perform:
Apply all migrations: account, auth, circuits, contenttypes, core, dcim, django_rq, extras, ipam, netbox_custom_objects, sessions, social_django, taggit, tenancy, users, virtualization, vpn, wireless
Running migrations:
Applying netbox_custom_objects.0001_initial...Traceback (most recent call last):
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
raise ex.with_traceback(None)
psycopg.errors.InsufficientPrivilege: permission denied for schema public
LINE 1: CREATE TABLE "netbox_custom_objects_customobject" ("id" bigi...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/netbox/./netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/core/management/base.py", line 416, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/core/management/base.py", line 460, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/core/management/base.py", line 107, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/core/management/commands/migrate.py", line 353, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/migrations/executor.py", line 135, in migrate
state = self._migrate_all_forwards(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/migrations/executor.py", line 255, in apply_migration
state = migration.apply(state, schema_editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/migrations/migration.py", line 132, in apply
operation.database_forwards(
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/migrations/operations/models.py", line 97, in database_forwards
schema_editor.create_model(model)
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/base/schema.py", line 512, in create_model
self.execute(sql, params or None)
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/postgresql/schema.py", line 45, in execute
return super().execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/base/schema.py", line 204, in execute
cursor.execute(sql, params)
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/utils.py", line 79, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/utils.py", line 100, in _execute
with self.db.wrap_database_errors:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/netbox/venv/lib64/python3.12/site-packages/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib64/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
raise ex.with_traceback(None)
django.db.utils.ProgrammingError: permission denied for schema public
LINE 1: CREATE TABLE "netbox_custom_objects_customobject" ("id" bigi...
^
((venv) ) [root@ip-10-0-1-106 netbox]#
Metadata
Metadata
Assignees
Labels
status: revisions neededThis issue requires additional information to be actionableThis issue requires additional information to be actionabletype: bug