cloudkitty install causes Horizon login page error

Bug #1787014 reported by Eric Miller
38
This bug affects 9 people
Affects Status Importance Assigned to Milestone
cloudkitty
Confirmed
Undecided
Erol Guzoglu
kolla-ansible
Invalid
Undecided
Unassigned
Queens
Triaged
Medium
Unassigned

Bug Description

Kolla version 6.1.0
Kolla-ansible version 6.1.0
Distro: CentOS 7.5

Reproduced with two similarly configured 6.1.0 deployments.

When including cloudkitty as an install option in globals.yml, an error is produced when loading the base URL for Horizon indicating:

No module named apiclient

I have included the Traceback window contents at the end of this message.

Note that this does not occur with Kolla/Kolla-Ansible version 7.0.0.0b3, however, in 7.0.0.0b3, clicking on the "Rating" menu item returns a 404 error and clicking on the "Reporting" menu item generates this error:

TypeError at /project/reporting/
context must be a dict rather than bool.

This is likely a completely different bug, but thought I'd mention it in case it was related. Seems like some work is necessary to get CloudKitty working in the latest versions of Horizon? Everything worked fine in Kolla-Ansible 6.0.0.

Eric

(URL redacted)

Environment

Request Method: GET
Request URL: http://xxxxxxxxxxxxxxxxxxxxxxxxxx/

Django Version: 1.11.9
Python Version: 2.7.5
Installed Applications:
['openstack_dashboard.dashboards.project',
 'cloudkittydashboard',
 'magnum_ui',
 'neutron_lbaas_dashboard',
 'heat_dashboard',
 'designatedashboard',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.identity',
 'openstack_dashboard.dashboards.settings',
 'neutron_fwaas_dashboard',
 'openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django_pyscss',
 'openstack_dashboard.django_pyscss_fix',
 'compressor',
 'horizon',
 'openstack_auth']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'horizon.middleware.OperationLogMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'horizon.themes.ThemeMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'openstack_dashboard.contrib.developer.profiler.middleware.ProfilerClientMiddleware',
 'openstack_dashboard.contrib.developer.profiler.middleware.ProfilerMiddleware')

Traceback:

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  131. response = middleware_method(request, response)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/middleware/locale.py" in process_response
  36. i18n_patterns_used, prefixed_default_language = is_language_prefix_patterns_used(urlconf)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/utils/lru_cache.py" in wrapper
  100. result = user_function(*args, **kwds)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/conf/urls/i18n.py" in is_language_prefix_patterns_used
  29. for url_pattern in get_resolver(urlconf).url_patterns:

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/utils/functional.py" in __get__
  35. res = instance.__dict__[self.name] = self.func(instance)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/urls/resolvers.py" in url_patterns
  405. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/utils/functional.py" in __get__
  35. res = instance.__dict__[self.name] = self.func(instance)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/urls/resolvers.py" in urlconf_module
  398. return import_module(self.urlconf_name)

File "/usr/lib64/python2.7/importlib/__init__.py" in import_module
  37. __import__(name)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/urls.py" in <module>
  42. url(r'', include(horizon.urls)),

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/conf/urls/__init__.py" in include
  51. patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/utils/functional.py" in inner
  238. self._setup()

File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/utils/functional.py" in _setup
  386. self._wrapped = self._setupfunc()

File "/var/lib/kolla/venv/lib/python2.7/site-packages/horizon/base.py" in url_patterns
  836. return self._urls()[0]

File "/var/lib/kolla/venv/lib/python2.7/site-packages/horizon/base.py" in _urls
  870. include(dash._decorated_urls)))

File "/var/lib/kolla/venv/lib/python2.7/site-packages/horizon/base.py" in _decorated_urls
  547. include(panel._decorated_urls)))

File "/var/lib/kolla/venv/lib/python2.7/site-packages/horizon/base.py" in _decorated_urls
  319. urlpatterns = self._get_default_urlpatterns()

File "/var/lib/kolla/venv/lib/python2.7/site-packages/horizon/base.py" in _get_default_urlpatterns
  121. urls_mod = import_module('.urls', package_string)

File "/usr/lib64/python2.7/importlib/__init__.py" in import_module
  37. __import__(name)

File "/var/lib/kolla/venv/lib/python2.7/site-packages/cloudkittydashboard/dashboards/admin/hashmap/urls.py" in <module>
  17. from cloudkittydashboard.dashboards.admin.hashmap import views

File "/var/lib/kolla/venv/lib/python2.7/site-packages/cloudkittydashboard/dashboards/admin/hashmap/views.py" in <module>
  24. from cloudkittyclient.apiclient import exceptions

Exception Type: ImportError at /
Exception Value: No module named apiclient

Tags: dashboard
Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

Hi, this issue was fixed in master by https://github.com/openstack/cloudkitty-dashboard/commit/15e65aec62067a0a7f40a5ed3c8804418e0e0ece

It is not backported to queens, dont know if it will.

I think they have to pin a cloudkittyclient version in queens or previous to a lower than the latest, so the apiclient is present in the cloudkittyclient.

Will add cloudkitty as affected project, so they can decide if pin the version or not.

Regards

Changed in cloudkitty:
status: New → Confirmed
tags: added: dashboard
Revision history for this message
Allan Krueger (klimber) wrote :

Any workarounds for queens?

Eduardo Gonzalez mentioned pinning a cloudkitty version for queens, how can I do that?

Revision history for this message
Erol Guzoglu (erolguzoglu) wrote :
Changed in cloudkitty:
assignee: nobody → Erol Guzoglu (erolguzoglu)
assignee: Erol Guzoglu (erolguzoglu) → nobody
assignee: nobody → Erol Guzoglu (erolguzoglu)
Revision history for this message
Erol Guzoglu (erolguzoglu) wrote :

@klimber

When I try to upgrade cloudkitty-dashboard python package 7.0.0 to 8.0.0 at all controller nodes, it worked. Horizon return HTTP 200 and I can login to dashboard.

docker exec -it horizon pip install --upgrade cloudkitty-dashboard

I don't think cloudkitty will works with %100 functionality. But you can use horizons other functions normally for now...

Cloudkitty project needs to release 7.0.1 after #630604 cherry-pick merged. I will notify for future updates.

Mark Goddard (mgoddard)
Changed in kolla-ansible:
status: New → Incomplete
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers