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

nautobot-dev (final-dev) docker image doesn't start #2671

Closed
joewesch opened this issue Oct 21, 2022 · 1 comment · Fixed by #2715
Closed

nautobot-dev (final-dev) docker image doesn't start #2671

joewesch opened this issue Oct 21, 2022 · 1 comment · Fixed by #2715
Assignees
Labels
type: bug Something isn't working as expected

Comments

@joewesch
Copy link
Contributor

Environment

  • Nautobot version (Docker tag too if applicable): 1.4.2 -> latest
  • Python version: 3.7 -> 3.10
  • Database platform, version: n/a
  • Middleware(s): n/a

Steps to Reproduce

  1. docker run --rm -it ghcr.io/nautobot/nautobot-dev:1.4.7-py3.10

Expected Behavior

Nautobot Dev should start up

Observed Behavior

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/nautobot/extras/plugins/utils.py", line 64, in load_plugin
    plugin = importlib.import_module(plugin_name)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'example_plugin'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/nautobot/core/runner/runner.py", line 116, in settings_callback
    initializer(
  File "/usr/local/lib/python3.10/site-packages/nautobot/core/cli.py", line 176, in _configure_settings
    load_plugins(settings)
  File "/usr/local/lib/python3.10/site-packages/nautobot/extras/plugins/utils.py", line 54, in load_plugins
    load_plugin(plugin_name, settings)
  File "/usr/local/lib/python3.10/site-packages/nautobot/extras/plugins/utils.py", line 67, in load_plugin
    raise PluginNotFound(
nautobot.extras.plugins.exceptions.PluginNotFound: Unable to import plugin example_plugin: Module not found. Check that the plugin module has been installed within the correct Python environment.
@glennmatthews
Copy link
Contributor

Thanks for the report! Hypothesis:

  • example_plugin is copied in under /source/examples/example_plugin and installed in the dependencies-dev-python target in editable mode
  • both dev and final-dev targets use development/nautobot_config.py as their Nautobot config file, which includes the example plugin
  • dev (what we use for Nautobot core development) works just fine this way.
  • final-dev (what we publish as nautobot-dev) removes everything under the /source directory, breaking the editable installation of the example plugin.

Possible solutions:

  • for final-dev, build the example plugin as a wheel and install it as non-editable so that the removal of /source doesn't impact it?
  • for final-dev, use a different nautobot_config.py that doesn't include the example plugin?

@glennmatthews glennmatthews added the type: bug Something isn't working as expected label Oct 21, 2022
@glennmatthews glennmatthews self-assigned this Nov 2, 2022
@glennmatthews glennmatthews changed the title nautobot-dev docker image doesn't start nautobot-dev (final-dev) docker image doesn't start Nov 2, 2022
glennmatthews added a commit that referenced this issue Nov 2, 2022
…, rename local docker-compose workflow images, etc.
glennmatthews added a commit that referenced this issue Nov 3, 2022
…, rename local docker-compose workflow images, etc. (#2715)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants