Horizon: Apache exceptions at import_module

I've deployed Openstack using juju, and everything looks normal except that I cannot browse to openstack-dashboard. I get error 500 Internal Server Error.

I looked through apache2 logs at that node and found these errors repeated every couple of minutes.

I tried to destroy the service and deploy it on other nodes; co-located with keystone node, then glance node, then by it self. Yet I get the same errors.

It looks like it needs deep python debugging which is weird since this is the typical charm deployment on a normal server. And someone must had tried to deploy this and succeeded!

I'm deploying openstack Essex version 2012.1.4-dev , Ubuntu server version 13.10 , django version is: (1, 5, 4, 'final', 0) And this is my juju status output

Please help me :)


Solution 1:

I am not sure about Essex, but OpenStack Grizzly is not compatible with django 1.5(the version you are using); you need to have django 1.4 installed.

To uninstall django 1.5, open a terminal(Ctrl+Alt+t) and type the following:

sudo pip uninstall django

and then to install django 1.4:

sudo pip install django==1.4.10

confirm version 1.4 is installed:

python

you will get the python interpreter

>>> import django;django.VERSION

the output should be:

(1, 4, 10, 'final', 0)

then restart apache service(which uses django):

sudo service apache2 restart

Source: Similar question on OpenStack's official question-answer forum

Solution 2:

The issue you were having is due to a bug in Juju: https://bugs.launchpad.net/cloud-archive/+bug/1240667, which I just fixed and tested successfully on EC2 using openstack-dashboard charm deployed on the bootstrap node. The fix will be included in the next development (1.17.3) or stable (1.18.0) version of juju-core.

The problem was on precise (12.04) machines, juju was adding the cloud-tools archive to get a version of mongodb-server on precise that works with juju. Now, the cloud-tools pocket is added with lower priority, so that packages in it won't try to interfere with packages from the main archive (used by charms).