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

"LookupError: No installed app with label" during "final" container startup with plugin(s) installed #785

Closed
glennmatthews opened this issue Aug 5, 2021 · 0 comments · Fixed by #788
Assignees
Labels
impact: high High severity bugs causing system wide impact type: bug Something isn't working as expected

Comments

@glennmatthews
Copy link
Contributor

glennmatthews commented Aug 5, 2021

Environment

  • Python version: 3.7
  • Nautobot version: 1.1.1

Steps to Reproduce

  1. Build non-dev image (i.e. build target final).
  2. Add at least one plugin to the image and enable it in PLUGINS in the nautobot_config.py
  3. Start the container
  4. Run nautobot-server with any subcommand (even nautobot-server help)

Expected Behavior

nautobot-server commands should work

Observed Behavior

root@aeba69afb96f:/opt/nautobot# nautobot-server help
2021-08-05 19:03:33,819 DEBUG Popen(['git', 'version'], cwd=/opt/nautobot, universal_newlines=False, shell=None, istream=None) - git.cmd - cmd - /usr/local/lib/python3.7/site-packages/git/cmd.py:811
2021-08-05 19:03:33,825 DEBUG Popen(['git', 'version'], cwd=/opt/nautobot, universal_newlines=False, shell=None, istream=None) - git.cmd - cmd - /usr/local/lib/python3.7/site-packages/git/cmd.py:811
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 156, in get_app_config
    return self.app_configs[app_label]
KeyError: 'my_plugin_name'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/nautobot-server", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/nautobot/core/cli.py", line 62, in main
    initializer=_configure_settings,  # Called after defaults
  File "/usr/local/lib/python3.7/site-packages/nautobot/core/runner/runner.py", line 266, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/usr/local/lib/python3.7/site-packages/nautobot/circuits/apps.py", line 9, in ready
    super().ready()
  File "/usr/local/lib/python3.7/site-packages/nautobot/core/apps/__init__.py", line 34, in ready
    register_menu_items(menu_items)
  File "/usr/local/lib/python3.7/site-packages/nautobot/core/apps/__init__.py", line 73, in register_menu_items
    reverse(item.link)
  File "/usr/local/lib/python3.7/site-packages/django/urls/base.py", line 55, in reverse
    app_list = resolver.app_dict[ns]
  File "/usr/local/lib/python3.7/site-packages/django/urls/resolvers.py", line 522, in app_dict
    self._populate()
  File "/usr/local/lib/python3.7/site-packages/django/urls/resolvers.py", line 456, in _populate
    for url_pattern in reversed(self.url_patterns):
  File "/usr/local/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.7/site-packages/django/urls/resolvers.py", line 589, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.7/site-packages/django/urls/resolvers.py", line 582, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.7/site-packages/nautobot/core/urls.py", line 7, in <module>
    from nautobot.extras.plugins.urls import (
  File "/usr/local/lib/python3.7/site-packages/nautobot/extras/plugins/urls.py", line 32, in <module>
    app = apps.get_app_config(plugin_name)
  File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 163, in get_app_config
    raise LookupError(message)
LookupError: No installed app with label 'my_plugin_name'.
@glennmatthews glennmatthews added type: bug Something isn't working as expected impact: high High severity bugs causing system wide impact labels Aug 5, 2021
@glennmatthews glennmatthews self-assigned this Aug 5, 2021
@glennmatthews glennmatthews changed the title "LookupError: No installed app with label" during startup with plugin(s) installed "LookupError: No installed app with label" during "final" container startup with plugin(s) installed Aug 5, 2021
glennmatthews added a commit that referenced this issue Aug 10, 2021
hellerve added a commit to hellerve/nautobot that referenced this issue Aug 12, 2021
* next: (37 commits)
  Add release-notes for nautobot#229 and nautobot#472
  JobResult list view to show job Meta.name where available instead of class_path (nautobot#775)
  Bump version to 1.1.3-beta.1
  Bump version and add release date
  Add release-notes for nautobot#785 and nautobot#786
  Prioritize LoganImporter over built-in importers. See nautobot#785 (nautobot#788)
  Add release-note for nautobot#789
  Remove url reverse lookup from nav menu initialization (nautobot#789)
  Add release-note for nautobot#758
  Update job docs (nautobot#758)
  Custom Fields View (nautobot#735)
  Add release-notes for nautobot#742, nautobot#771, nautobot#773
  Adding Logging Examples (nautobot#771)
  Process NAUTOBOT_DEBUG environment var (nautobot#742)
  Expanding the prometheus metrics docs (nautobot#773)
  Add release-note for nautobot#782
  Update docs and examples to reflect invoke changes made by nautobot#584 (nautobot#782)
  Added release-notes for nautobot#723 and bump prerelease version
  Updates Powerfeed Utilization Data (nautobot#772)
  Bump version and release date.
  ...
hellerve added a commit to hellerve/nautobot that referenced this issue Aug 23, 2021
* develop: (32 commits)
  Add object variable lookup (nautobot#837)
  Add release-note for nautobot#718
  Fix nautobot#718: Computed field template overflow (nautobot#831)
  Add release-notes for nautobot#825 and nautobot#832
  remove celery worker -B option (nautobot#827)
  Update Using Plugins guide to have Post Upgrade run. (nautobot#833)
  Add release-notes for nautobot#715 and nautobot#812
  GraphQL navbar overflowing into Graphiql  (nautobot#812)
  Add release-notes for nautobot#464, nautobot#731, nautobot#818
  Adding Logic for read-only hdb health check (nautobot#819)
  Fix nautobot#731 - enforce 'format' in config context schemas (nautobot#822)
  Fix GraphQL filterset handling of custom fields (nautobot#821)
  Add release-notes for nautobot#779, nautobot#791, nautobot#809
  Change the docker-compose file version to support start_period property (nautobot#810)
  Adding docs and logic to skip initialization in docker (nautobot#793)
  Fix incorrect tenancy display in related prefixes table (nautobot#806)
  Bump version to 1.1.3-beta.1
  Bump version and add release date
  Add release-notes for nautobot#785 and nautobot#786
  Prioritize LoganImporter over built-in importers. See nautobot#785 (nautobot#788)
  ...
hellerve added a commit to hellerve/nautobot that referenced this issue Aug 23, 2021
* develop: (32 commits)
  Add object variable lookup (nautobot#837)
  Add release-note for nautobot#718
  Fix nautobot#718: Computed field template overflow (nautobot#831)
  Add release-notes for nautobot#825 and nautobot#832
  remove celery worker -B option (nautobot#827)
  Update Using Plugins guide to have Post Upgrade run. (nautobot#833)
  Add release-notes for nautobot#715 and nautobot#812
  GraphQL navbar overflowing into Graphiql  (nautobot#812)
  Add release-notes for nautobot#464, nautobot#731, nautobot#818
  Adding Logic for read-only hdb health check (nautobot#819)
  Fix nautobot#731 - enforce 'format' in config context schemas (nautobot#822)
  Fix GraphQL filterset handling of custom fields (nautobot#821)
  Add release-notes for nautobot#779, nautobot#791, nautobot#809
  Change the docker-compose file version to support start_period property (nautobot#810)
  Adding docs and logic to skip initialization in docker (nautobot#793)
  Fix incorrect tenancy display in related prefixes table (nautobot#806)
  Bump version to 1.1.3-beta.1
  Bump version and add release date
  Add release-notes for nautobot#785 and nautobot#786
  Prioritize LoganImporter over built-in importers. See nautobot#785 (nautobot#788)
  ...
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact: high High severity bugs causing system wide impact type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants