Bug 1271219 - Image deletion from Horizon failed when browser language setting is Japanese
Summary: Image deletion from Horizon failed when browser language setting is Japanese
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 7.0 (Kilo)
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 7.0 (Kilo)
Assignee: Matthias Runge
QA Contact: Ido Ovadia
URL:
Whiteboard:
: 1248851 (view as bug list)
Depends On:
Blocks: 1235795
TreeView+ depends on / blocked
 
Reported: 2015-10-13 12:06 UTC by Pratik Pravin Bandarkar
Modified: 2019-08-15 05:39 UTC (History)
9 users (show)

Fixed In Version: python-django-horizon-2015.1.1-3.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-18 16:38:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1988403 0 None None None Never

Description Pratik Pravin Bandarkar 2015-10-13 12:06:51 UTC
Description of problem:

When my browser language setting is Japanese, 'Delete Image' Horizon operation failed, but the image was deleted actually.
When my browser language setting is English, 'Delete Image' Horizon operation succeeded.
Image create/delete via glance/openstack client work without problems.

<snip>
2015-10-13 17:26:01,704 17287 ERROR django.request Internal Server Error: /dashboard/project/images/
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_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 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 223, in post
    return self.get(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 159, in get
    handled = self.construct_tables()
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 150, in construct_tables
    handled = self.handle_table(table)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 125, in handle_table
    handled = self._tables[name].maybe_handle()
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1640, in maybe_handle
    return self.take_action(action_name, obj_id)
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1482, in take_action
    response = action.multiple(self, self.request, obj_ids)
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 302, in multiple
    return self.handle(data_table, request, object_ids)
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 827, in handle
    exceptions.handle(request, ignore=ignore)
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 364, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 817, in handle
    (self._get_action_name(past=True), datum_display))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)
</snip>
______

but actually image is deleted:

2015-10-13 22:56:01.619 4219 DEBUG glance_store._drivers.filesystem [req-7cc1b97e-c6b8-4450-99c9-6bd07e6f134b 69425be5606c49738cdfb25cda921cf6 ae986eddd92746b2bf38faf60f64b28e - - -] Deleting image at /var/lib/glance/images/cbb54fe4-17b4-4633-a526-495454ffc9a3 delete /usr/lib/python2.7/site-packages/glance_store/_drivers/filesystem.py:498

2015-10-13 22:56:01.685 4217 INFO glance.registry.api.v1.images [req-be81d22a-191f-48c5-969f-b2e6dc76f5f0 69425be5606c49738cdfb25cda921cf6 ae986eddd92746b2bf38faf60f64b28e - - -] Successfully deleted image cbb54fe4-17b4-4633-a526-495454ffc9a3

__________________________

Upstream bz link: https://bugs.launchpad.net/horizon/+bug/1464461

I am able to fix issue after applying https://review.openstack.org/#/c/227143/

i.e. 


- I updated: /usr/lib/python2.7/site-packages/horizon/tables/actions.py

806                 LOG.info(u'Permission denied to %s: "%s"' %   <==

[...]
816                 LOG.info(u'%s: "%s"' % <==
817                          (self._get_action_name(past=True), datum_display))
_______

- restarted "httpd" service.


Version-Release number of selected component (if applicable):
python-django-horizon-2015.1.0-10.el7ost.noarch


How reproducible:
100%

Steps to Reproduce:
1. change the language from horizon(dashboard --> settings --> Language --> Ja
2. try removing any glance image.
3.

Actual results:
When browser(from horizon) language setting is Japanese, 'Delete Image' Horizon operation failed, but the image was deleted actually.

Expected results:
operation should be successful. 

Additional info:

Comment 2 Matthias Runge 2015-10-13 12:53:34 UTC
there is already a package, which fixes this issue.

Comment 3 Matthias Runge 2015-11-10 07:36:32 UTC
*** Bug 1248851 has been marked as a duplicate of this bug. ***

Comment 6 Matthias Runge 2015-12-10 07:06:06 UTC
The fix is included in all builds later than python-django-horizon-2015.1.1-3.el7ost

Comment 7 Lon Hohberger 2016-03-11 18:18:48 UTC
This bug is resolved by the current packages available from the Red Hat Enterprise Linux OpenStack Platform 7 repository.

Comment 8 Lon Hohberger 2016-03-15 20:12:54 UTC
According to our records, this should be resolved by python-django-horizon-2015.1.2-4.el7ost.  This build is available now.

Comment 9 lkuchlan 2016-04-04 09:39:57 UTC
Tested using:
python-django-horizon-2015.1.2-4.el7ost.noarch

Verification flow:
1. change the language from horizon(dashboard --> settings --> Language --> Ja
2. try removing any glance image.

Results:
operation should be successful.


Note You need to log in before you can comment on or make changes to this bug.