[Murano][Artifacts] Server Error when user types non-ascii letters in the filter query

Bug #1535268 reported by Anastasia Kuznetsova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Alexander Tivelkov
8.0.x
Fix Released
High
Alexander Tivelkov
9.x
Fix Released
High
Alexander Tivelkov

Bug Description

Steps to reproduce:
1. Deploy MOS 8.0 (3 kvm controllers, 1 hw compute, all ceph, neutron VXLAN, murano, murano-glance-artifacts)
2. Log in web UI
3. Navigate to Murano > Manage > Package Definitions
4. Type "йыйый" in the Filter text field and click on "Filter" button.

Observed result:
Something went wrong in the dashboard

glance-api.log:
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi [req-25299f84-7978-4315-a49f-15aeb949356f d07ff273e21e48b38c4bb1842416658a c5ab8b7992614dd6840f3feb03736414 - - -] Caught error: 'ascii' codec can't e
ncode characters in position 0-6: ordinal not in range(128)
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi Traceback (most recent call last):
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 876, in __call__
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi action, request)
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 907, in dispatch
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi return method(*args, **kwargs)
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi File "/usr/lib/python2.7/dist-packages/glance/api/v3/artifacts.py", line 810, in list
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi params)
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi File "/usr/lib/python2.7/dist-packages/glance/api/v3/artifacts.py", line 768, in _get_filters
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi property_value = self._bring_to_type(str_type, property_value)
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi File "/usr/lib/python2.7/dist-packages/glance/api/v3/artifacts.py", line 703, in _bring_to_type
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi return mapper[type_name](value)
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)
2016-01-18 11:02:30.477 21402 ERROR glance.common.wsgi
2016-01-18 11:02:30.478 21402 INFO eventlet.wsgi.server [req-25299f84-7978-4315-a49f-15aeb949356f d07ff273e21e48b38c4bb1842416658a c5ab8b7992614dd6840f3feb03736414 - - -] 192.168.0.6 - - [18/Jan/2016 11:02:30] "GET /v3/artifacts/murano/v1?&limit=20&type=%D0%B4%D1%88%D0%B8%D0%BA%D1%84%D0%BA%D0%BD&sort=name:asc HTTP/1.1" 500 449 0.538006

VERSION:
  feature_groups:
    - mirantis
    - experimental
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "435"
  build_id: "435"
  fuel-nailgun_sha: "1c0f713999acbac09c6b36600f794bf57fd8c619"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "0c1b17537a35d1b56f382fcc48197d0ee0c02d90"
  fuel-nailgun-agent_sha: "92ebd5ade6fab60897761bfa084aefc320bff246"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "81719690e46a26d7873f606d6a97fe65003c96ed"
  fuel-ostf_sha: "4ade03edf9620c3c399dcce60f1a3972f1fc0da8"
  fuel-mirror_sha: "b62f3cce5321fd570c6589bc2684eab994c3f3f2"
  fuelmenu_sha: "85de57080a18fda18e5325f06eaf654b1b931592"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "9f0ba4577915ce1e77f5dc9c639a5ef66ca45896"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "cecae4163e6aa4d393d062380cd19cf8ad1b05ac"

Tags: area-murano
tags: added: murano
Changed in mos:
importance: Undecided → High
milestone: none → 8.0
assignee: nobody → Alexander Tivelkov (ativelkov)
tags: added: area-murano
removed: murano
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-muranoclient (openstack-ci/fuel-8.0/liberty)

Fix proposed to branch: openstack-ci/fuel-8.0/liberty
Change author: Alexander Tivelkov <email address hidden>
Review: https://review.fuel-infra.org/16363

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/python-muranoclient (openstack-ci/fuel-8.0/liberty)

Reviewed: https://review.fuel-infra.org/16363
Submitter: Pkgs Jenkins <email address hidden>
Branch: openstack-ci/fuel-8.0/liberty

Commit: 3c28fe84914a418434167bc0cb12f53066a993c9
Author: Alexander Tivelkov <email address hidden>
Date: Thu Jan 21 17:36:13 2016

Gracefully handle unicode in artifacts filtering args

Due to an upstream bug Glare cannot properly handle the unicode in
artifacts filtering parameters.
Until this is fixed we should not pass unicode string as query
parameters to glare api.

This patch adds graceful handling by immediately returning an empty
list of artifacts if at least one of the query args contains unicode
character.

Closes-bug: #1535268

Change-Id: Ifbb0f13b836a97b0dc94359fc91637b725ec0cd4

Revision history for this message
Anastasia Kuznetsova (akuznetsova) wrote :

Verified on:
VERSION:
  feature_groups:
    - mirantis
    - experimental
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "529"
  build_id: "529"
  fuel-nailgun_sha: "baec8643ca624e52b37873f2dbd511c135d236d9"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "658be72c4b42d3e1436b86ac4567ab914bfb451b"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "e2d79330d5d708796330fac67722c21f85569b87"
  fuel-ostf_sha: "3bc76a63a9e7d195ff34eadc29552f4235fa6c52"
  fuel-mirror_sha: "fb45b80d7bee5899d931f926e5c9512e2b442749"
  fuelmenu_sha: "e071216cb214e34b4d861478033425ee6a54a3be"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "a365f05b903368225da3fea9aa42afc1d50dc9b4"

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-muranoclient (9.0/mitaka)

Fix proposed to branch: 9.0/mitaka
Change author: Alexander Tivelkov <email address hidden>
Review: https://review.fuel-infra.org/18729

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/python-muranoclient (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/18729
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: 8a29fbf9d0647983794cea9aa1a901beb7893c05
Author: Alexander Tivelkov <email address hidden>
Date: Sun Apr 3 23:24:11 2016

Gracefully handle unicode in artifacts filtering args

Due to an upstream bug Glare cannot properly handle the unicode in
artifacts filtering parameters.
Until this is fixed we should not pass unicode string as query
parameters to glare api.

This patch adds graceful handling by immediately returning an empty
list of artifacts if at least one of the query args contains unicode
character.

Closes-bug: #1535268

Change-Id: Ifbb0f13b836a97b0dc94359fc91637b725ec0cd4

Revision history for this message
Alex Kholkin (akholkin) wrote :

Verified on #331 ISO
MOS 9.0

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-muranoclient (mcp/newton)

Fix proposed to branch: mcp/newton
Change author: Alexander Tivelkov <email address hidden>
Review: https://review.fuel-infra.org/33747

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-muranoclient (11.0/ocata)

Fix proposed to branch: 11.0/ocata
Change author: Alexander Tivelkov <email address hidden>
Review: https://review.fuel-infra.org/34072

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-muranoclient (mcp/ocata)

Fix proposed to branch: mcp/ocata
Change author: Alexander Tivelkov <email address hidden>
Review: https://review.fuel-infra.org/34732

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/python-muranoclient (11.0/ocata)

Change abandoned by Roman Podoliaka <email address hidden> on branch: 11.0/ocata
Review: https://review.fuel-infra.org/34072
Reason: we do not need 11.0/ocata anymore - use mcp/ocata instead

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/python-muranoclient (mcp/ocata)

Change abandoned by Ihor Kalnytskyi <email address hidden> on branch: mcp/ocata
Review: https://review.fuel-infra.org/34732
Reason: There no link for upstream Glance bug, however, I'd expect it's fixed.

Anyway, this patch does not fix the problem but hide it. I'd prefer to do not do this and enforce fixing Glare API instead. Taking into account that Glare is a standalone project now, I'm going to abandon this patch.

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/python-muranoclient (mcp/newton)

Change abandoned by Ihor Kalnytskyi <email address hidden> on branch: mcp/newton
Review: https://review.fuel-infra.org/33747
Reason: There no link for upstream Glance bug, however, I'd expect it's fixed.
Anyway, this patch does not fix the problem but hide it. I'd prefer to do not do this and enforce fixing Glare API instead. Taking into account that Glare is a standalone project now, I'm going to abandon this patch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.