ImportError: No module named muranodashboard

Asked by Bharath Krishna M

I have devstack installed on my Ubuntu and I tried to manually install murano using the following link:

http://murano.readthedocs.org/en/latest/install/

Every thing was fine with respect to installation of Murano API service and engine.

Murano Dashboard tox was executed successfully and using the update_setting.sh file I have updated the existing settings.py file in already installed horizon path.

./update_setting.sh --input=/opt/stack/horizon/openstack_dashboard/settings.py
12-02-2014 16:40 LOG:>Creating "/tmp/tmp.YMN71sd8S0" temprorary file to compose Murano Data
12-02-2014 16:40 LOG:>The following data will be added to the config: #START_MURANO_DASHBOARD
HORIZON_CONFIG['dashboards'] += ('murano',)
INSTALLED_APPS += ('muranodashboard', 'floppyforms',)
MIDDLEWARE_CLASSES += ('muranodashboard.middleware.ExceptionMiddleware',)
#NETWORK_TOPOLOGY = 'routed'
#MURANO_API_URL = 'http://localhost:8082'
#if murano-api is set up with ssl, uncomment next strings
#MURANO_API_INSECURE = True
MAX_FILE_SIZE_MB = 5
#END_MURANO_DASHBOARD
12-02-2014 16:40 LOG:>Adding Murano data to "/opt/stack/horizon/openstack_dashboard/settings.py"
12-02-2014 16:40 LOG:>Deleting "/tmp/tmp.YMN71sd8S0"
12-02-2014 16:40 LOG:>...SUCCESS

Now while trying to run the Django server using the below command, I faced the following error:

tox -e venv -- python manage.py runserver <IP:PORT>

tox -e venv -- python manage.py runserver 172.16.69.217:8000
venv develop-inst-nodeps: /home/ubuntu/Stack/murano-dashboard
venv runtests: PYTHONHASHSEED='1569222993'
venv runtests: commands[0] | python manage.py runserver 172.16.69.217:8000
WARNING:root:"dashboards" and "default_dashboard" in (local_)settings is DEPRECATED now and may be unsupported in some future release. The preferred way to specify the order of dashboards and the default dashboard is the pluggable dashboard mechanism (in /home/ubuntu/Stack/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/openstack_dashboard/enabled, /home/ubuntu/Stack/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/openstack_dashboard/local/enabled).
WARNING:root:"dashboards" and "default_dashboard" in (local_)settings is DEPRECATED now and may be unsupported in some future release. The preferred way to specify the order of dashboards and the default dashboard is the pluggable dashboard mechanism (in /home/ubuntu/Stack/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/openstack_dashboard/enabled, /home/ubuntu/Stack/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/openstack_dashboard/local/enabled).
Validating models...

0 errors found
December 02, 2014 - 11:37:31
Django version 1.6.8, using settings 'muranodashboard.settings'
Starting development server at http://172.16.69.217:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.
ERROR: InvocationError: '/home/ubuntu/Stack/murano-dashboard/.tox/venv/bin/python manage.py runserver 172.16.69.217:8000'

As this port is already being used by Horizon, I tried to stop horizon service using devstack screen and restarted apache server.

Now that the murano dashboard changes are taken into horizon settings.py, and I have tried to restart the horizon service, the service could not come up throwing the below error:

[Tue Dec 02 11:48:08.272599 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] self._wrapped = self._setupfunc()
[Tue Dec 02 11:48:08.272608 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/base.py", line 806, in url_patterns
[Tue Dec 02 11:48:08.272819 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] return self._urls()[0]
[Tue Dec 02 11:48:08.272832 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/base.py", line 813, in _urls
[Tue Dec 02 11:48:08.272848 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] self._autodiscover()
[Tue Dec 02 11:48:08.272858 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/base.py", line 859, in _autodiscover
[Tue Dec 02 11:48:08.272870 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] mod = import_module(app)
[Tue Dec 02 11:48:08.272878 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
[Tue Dec 02 11:48:08.272889 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] __import__(name)
[Tue Dec 02 11:48:08.272907 2014] [:error] [pid 5110:tid 140585973397248] [remote 127.0.0.1:63935] ImportError: No module named muranodashboard

Can some one please help on resolving the port already in use issue and horizon import error shown below and installing Murano dashboard successfully.

Thank you.

Bharath

Question information

Language:
English Edit question
Status:
Solved
For:
Murano Edit question
Assignee:
No assignee Edit question
Solved by:
Bharath Krishna M
Solved:
Last query:
Last reply:
Revision history for this message
Bharath Krishna M (m-bharathkrishna) said :
#1

The file used as input to update_setting.sh needs to be picked from the tox environment.

./update_setting.sh --input=./update_setting.sh --input=/opt/stack/horizon/openstack_dashboard/settings.py

The settings will be updated in that settings.py file and then we need to run manage.py present in murano-dashboard.