Horizon fails to load volume details tabs (unexpected keyword argument 'volume')

asked 2019-12-17 00:46:57 -0600

When I click on volume name in volumes list it fails with standart error text:

An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.


Internal Server Error: /dashboard/project/volumes/0d657501-9483-42ea-a86b-07298e9ab2ab/
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/share/openstack-dashboard/horizon/decorators.py", line 36, in dec
return view_func(request, *args, **kwargs)
File "/usr/share/openstack-dashboard/horizon/decorators.py", line 52, in dec
return view_func(request, *args, **kwargs)
File "/usr/share/openstack-dashboard/horizon/decorators.py", line 36, in dec
return view_func(request, *args, **kwargs)
File "/usr/share/openstack-dashboard/horizon/decorators.py", line 84, in dec
return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
  return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch
  return handler(request, *args, **kwargs)
File "/usr/share/openstack-dashboard/horizon/tabs/views.py", line 120, in get
File "/usr/share/openstack-dashboard/horizon/tabs/views.py", line 88, in load_tabs
  tab_group = self.get_tabs(self.request, **self.kwargs)
File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/volumes/views.py", line 195, in get_tabs
  return self.tab_group_class(request, volume=volume, **kwargs)
File "/usr/share/openstack-dashboard/horizon/tabs/base.py", line 109, in __init__
  tab_instances.append((tab.slug, tab(self, request)))
File "/usr/share/openstack-dashboard/horizon/tabs/base.py", line 438, in __init__
  for table in self.table_classes]
TypeError: __init__() got an unexpected keyword argument 'volume'

An init of TableTab class is:

table_classes = None

def __init__(self, tab_group, request):
    super(TableTab, self).__init__(tab_group, request)
    if not self.table_classes:
        class_name = self.__class__.__name__
        raise NotImplementedError("You must define a table_class "
                                  "attribute on %s" % class_name)
    # Instantiate our table classes but don't assign data yet
    if self._allowed:
        table_instances = [(table._meta.name,
                            table(request, **tab_group.kwargs))
                            for table in self.table_classes]
    # When a corresponding tab is not allowed, there is no need to
    # instantiate table classes (Related to bug 1791296).
        table_instances = []
    self._tables = OrderedDict(table_instances)
    self._table_data_loaded = False

I have an idea to check whether it is 'volumes' or not, and just remove **tab_group.kwargs part out of table parameters, but it is not a good solution..

There, probably were some source changes made with it before I was employeed (to refine this concrete openstack system too), some customizations. Can anyone tell where can be the reason of that? I didnt find any critical difference between horizon repos and our version in functions, mentioned in logs... Of course Im ready ... (more)

edit retag flag offensive close merge delete