Comment 1 for bug 1361235

Revision history for this message
James Slagle (james-slagle) wrote :

i've done some looking into this as well. As correctly indentified, the issue is with the import_modules_from_package function in osprofiler._utils.

The main difference between how TripleO configures horizon and how devstack configures horizon is that in TripleO, horizon is installed in a python virtualenv along with it's dependencies. The following line in the django.wsgi file for Horizon adds a relative path to sys.path:

sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..'))

osprofiler ends up getting imported from the venv using that relative path (with a "../..") in it, and thus triggering this bug.