← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1770326] Re: Can't Update Volume Status on dashboard if cinder volume stunk at reserved status

 

Reviewed:  https://review.openstack.org/567504
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=4776428cb69c57408745f75bd5c24228e8bdea44
Submitter: Zuul
Branch:    master

commit 4776428cb69c57408745f75bd5c24228e8bdea44
Author: Larry GUO <guo1017138@xxxxxxx>
Date:   Thu May 10 08:09:58 2018 +0000

    Add reserved status key word to horizon
    
    Horizon don't have related change which align with the
    change in https://review.openstack.org/#/c/330285.
    With this fix, horizon can work as expected
    
    Change-Id: I5940c662a0bec2beaf4863e07f7244311ba51212
    Closes-Bug: #1770326
    Signed-off-by: GUO Larry <guo1017138@xxxxxxx>


** 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/1770326

Title:
  Can't Update Volume Status on dashboard if cinder volume stunk at
  reserved status

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  I am using Openstack Version Queens with CentOS7
   OpenStack Horizon version: 
  # rpm -qa | grep horizon
  puppet-horizon-12.4.0-1.el7.noarch
  python-django-horizon-13.0.0-1.el7.noarch

  
  several of my volumes stunk at reserved status for some reason. I tried to click "Update Volume Status" button on GUI, but no window pop out. Instead, a ERROR message display on the up-right corner.

  "Danger: An error occurred. Please try again later."

  The horizon.log complains:

  2018-05-10 05:47:34,253 16741 ERROR django.request Internal Server Error: /dashboard/admin/volumes/6d6f9816-3f15-4475-bfad-2727768d85e8/update_status
  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/lib/python2.7/site-packages/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 113, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/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/lib/python2.7/site-packages/django/views/generic/edit.py", line 174, in get
      return self.render_to_response(self.get_context_data())
    File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/admin/volumes/views.py", line 233, in get_context_data
      context = super(UpdateStatusView, self).get_context_data(**kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/forms/views.py", line 141, in get_context_data
      context = super(ModalFormView, self).get_context_data(**kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/forms/views.py", line 74, in get_context_data
      context = super(ModalFormMixin, self).get_context_data(**kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/forms/views.py", line 55, in get_context_data
      context = super(ModalBackdropMixin, self).get_context_data(**kwargs)
    File "/usr/lib/python2.7/site-packages/django/views/generic/edit.py", line 93, in get_context_data
      kwargs['form'] = self.get_form()
    File "/usr/lib/python2.7/site-packages/horizon/forms/views.py", line 176, in get_form
      return form_class(self.request, **self.get_form_kwargs())
    File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/admin/volumes/forms.py", line 225, in __init__
      kwargs['initial']['status'] = choices[current_status]
  KeyError: u'reserved'

  
  I can successfully reset-state with openstack CLI command.

  cinder reset-state --state available <volume id>

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


References