-
-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using the Docker Compose setup with the USE_OPENWISP_TOPOLOGY set to False the dashboard service won't start due to an error.
docker-openwisp-dashboard-1 | Running migrations:
docker-openwisp-dashboard-1 | No migrations to apply.
docker-openwisp-dashboard-1 | Traceback (most recent call last):
docker-openwisp-dashboard-1 | File "/opt/openwisp/load_init_data.py", line 258, in <module>
docker-openwisp-dashboard-1 | Topology = load_model('topology', 'Topology')
docker-openwisp-dashboard-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
docker-openwisp-dashboard-1 | File "/usr/local/lib/python3.12/site-packages/swapper/__init__.py", line 79, in load_model
docker-openwisp-dashboard-1 | raise ImproperlyConfigured(
docker-openwisp-dashboard-1 | django.core.exceptions.ImproperlyConfigured: Could not find topology.Topology!
docker-openwisp-dashboard-1 exited with code 0
Steps To Reproduce
Steps to reproduce the behavior:
- Clone the https://github.com/openwisp/docker-openwisp repository
- Edit the
.envfile and replaceUSE_OPENWISP_TOPOLOGY=TruewithUSE_OPENWISP_TOPOLOGY=False - Start the Docker Compose stack using
docker compose up -d - See the error in the logs of the
dashboardservice usingdocker compose logs -f dashboard
Expected behavior
The dashboard service should not fail, and the script load_init_data.py should not exit when the variable USE_OPENWISP_TOPOLOGY is set to False
The script should check the variable value differently here : https://github.com/openwisp/docker-openwisp/blob/master/images/openwisp_dashboard/load_init_data.py#L258
- if os.environ.get('USE_OPENWISP_TOPOLOGY', False):
+ if os.environ.get('USE_OPENWISP_TOPOLOGY', False) == "True":
Topology = load_model('topology', 'Topology')
create_default_topology(default_vpn)Screenshots
n/a
System Informatioon:
- OS: Ubuntu 22.04 LTS
- Docker version: Docker version 24.0.7, build 311b9ff
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working