Reviewed:  https://review.opendev.org/c/openstack/horizon/+/945598
Committed: 
https://opendev.org/openstack/horizon/commit/1221d35a5687d20c782ee904f38fca6087375d41
Submitter: "Zuul (22348)"
Branch:    master

commit 1221d35a5687d20c782ee904f38fca6087375d41
Author: David Hill <dh...@redhat.com>
Date:   Wed Mar 26 10:10:49 2025 -0400

    Fix internal server error if all volumes are in other projects
    
    This addresses the situation where all volumes are in another project
    and details can't be fetched.   Before this patch, horizon would return
    an internal server error but with this patch, an error will be returned
    instead .
    
    Change-Id: Id0522c884700dc2d005a4a665256a8c5e63da741
    Closes-bug: #1971143


** Changed in: horizon
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1971143

Title:
  AttributeError: 'Server' object has no attribute 'volumes'

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  Installed version is:

  Openstack: focal/ussuri
  openstack-dashboard              3:18.3.3-0ubuntu1
  openstack-dashboard-common       3:18.3.3-0ubuntu1
  openstack-dashboard-ubuntu-theme 3:18.3.3-0ubuntu1

  Full traceback of error:

  [Mon May 02 11:03:56.319073 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   warnings.warn(
  [Mon May 02 11:03:56.321953 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476] Internal Server Error: 
/project/instances/7ef9bcab-e153-4691-a522-9e962e61112a/
  [Mon May 02 11:03:56.321966 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476] Traceback (most recent call last):
  [Mon May 02 11:03:56.321968 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in 
inner
  [Mon May 02 11:03:56.321971 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     response = get_response(request)
  [Mon May 02 11:03:56.321974 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 115, in 
_get_response
  [Mon May 02 11:03:56.321977 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     response = 
self.process_exception_by_middleware(e, request)
  [Mon May 02 11:03:56.321980 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 113, in 
_get_response
  [Mon May 02 11:03:56.321982 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     response = 
wrapped_callback(request, *callback_args, **callback_kwargs)
  [Mon May 02 11:03:56.321998 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/decorators.py", line 52, in dec
  [Mon May 02 11:03:56.322001 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return view_func(request, 
*args, **kwargs)
  [Mon May 02 11:03:56.322003 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/decorators.py", line 36, in dec
  [Mon May 02 11:03:56.322006 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return view_func(request, 
*args, **kwargs)
  [Mon May 02 11:03:56.322008 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/decorators.py", line 36, in dec
  [Mon May 02 11:03:56.322010 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return view_func(request, 
*args, **kwargs)
  [Mon May 02 11:03:56.322012 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/decorators.py", line 113, in dec
  [Mon May 02 11:03:56.322014 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return view_func(request, 
*args, **kwargs)
  [Mon May 02 11:03:56.322016 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/decorators.py", line 84, in dec
  [Mon May 02 11:03:56.322018 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return view_func(request, 
*args, **kwargs)
  [Mon May 02 11:03:56.322020 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/django/views/generic/base.py", line 71, in view
  [Mon May 02 11:03:56.322023 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return self.dispatch(request, 
*args, **kwargs)
  [Mon May 02 11:03:56.322025 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/django/views/generic/base.py", line 97, in 
dispatch
  [Mon May 02 11:03:56.322027 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return handler(request, *args, 
**kwargs)
  [Mon May 02 11:03:56.322029 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/tabs/views.py", line 71, in get
  [Mon May 02 11:03:56.322031 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     context = 
self.get_context_data(**kwargs)
  [Mon May 02 11:03:56.322034 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/openstack_dashboard/dashboards/project/instances/views.py",
 line 485, in get_context_data
  [Mon May 02 11:03:56.322036 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     context = super(DetailView, 
self).get_context_data(**kwargs)
  [Mon May 02 11:03:56.322039 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/tabs/views.py", line 55, in 
get_context_data
  [Mon May 02 11:03:56.322041 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     exceptions.handle(self.request)
  [Mon May 02 11:03:56.322043 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/tabs/views.py", line 53, in 
get_context_data
  [Mon May 02 11:03:56.322045 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     
context["tab_group"].load_tab_data()
  [Mon May 02 11:03:56.322047 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/tabs/base.py", line 175, in 
load_tab_data
  [Mon May 02 11:03:56.322052 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     exceptions.handle(self.request)
  [Mon May 02 11:03:56.322055 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/horizon/tabs/base.py", line 172, in 
load_tab_data
  [Mon May 02 11:03:56.322057 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     tab._data = 
tab.get_context_data(self.request)
  [Mon May 02 11:03:56.322059 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/openstack_dashboard/dashboards/project/instances/tabs.py",
 line 39, in get_context_data
  [Mon May 02 11:03:56.322061 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     if instance.volumes and not 
instance.image:
  [Mon May 02 11:03:56.322063 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]   File 
"/usr/lib/python3/dist-packages/openstack_dashboard/api/base.py", line 139, in 
__getattribute__
  [Mon May 02 11:03:56.322066 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476]     return 
object.__getattribute__(self, attr)
  [Mon May 02 11:03:56.322068 2022] [wsgi:error] [pid 4147296:tid 
140406849447680] [remote 10.45.81.86:54476] AttributeError: 'Server' object has 
no attribute 'volumes'

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1971143/+subscriptions


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to