Create share button does not work when a specific share type is created

Bug #2043572 reported by sehun Jeong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
manila-ui
Fix Released
Medium
sehun Jeong

Bug Description

When the "advanced" share type is created, the create share button does not work in Horizon.
In addition, /share/create url also causes the following errors.

Exception Value: 'utf-8' codec can't decode byte 0xea in position 1: invalid continuation byte

version 2023.1

Vida Haririan (vhariria)
Changed in manila-ui:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Vida Haririan (vhariria) wrote :

Hello,

Thank you for reporting this issue.

If you have CLI access, please provide the output of “openstack share type list” as admin, and horizon logs.

See additional discussions at https://meetings.opendev.org/meetings/manila/2023/manila.2023-11-16-15.00.log.html

Revision history for this message
sehun Jeong (sehun) wrote (last edit ):
Download full text (5.6 KiB)

$ openstack share type list
+--------------------------------------+------------+------------+------------+--------------------------------------+----------------------+-------------+
| ID | Name | Visibility | Is Default | Required Extra Specs | Optional Extra Specs | Description |
+--------------------------------------+------------+------------+------------+--------------------------------------+----------------------+-------------+
| b8b9acb9-e861-4dcb-901b-d3ee6580ce7c | advanced | public | False | driver_handles_share_servers : False | | None |
| a963d2b7-f80c-466b-888b-5909e6fdabee | default | public | True | driver_handles_share_servers : True | | None |
| a0b5b647-b461-45ac-bd90-253ddd222198 | dhss_false | public | False | driver_handles_share_servers : False | | None |
| 4b0b6701-fd89-4537-99d1-8a47933cbd12 | dhss_true | public | False | driver_handles_share_servers : True | | None |
+--------------------------------------+------------+------------+------------+--------------------------------------+----------------------+-------------+

When i attach /share/create in horizon. the following error occurs.

Environment:

Request Method: GET
Request URL: http://10.11.11.100/dashboard/project/shares/create/

Django Version: 3.2.16
Python Version: 3.10.12
Installed Applications:
['openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.identity',
 'openstack_dashboard.dashboards.settings',
 'openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'openstack_dashboard.django_pyscss_fix',
 'django_pyscss',
 'debreach',
 'compressor',
 'horizon',
 'openstack_auth']
Installed Middleware:
('openstack_auth.middleware.OpenstackAuthMonkeyPatchMiddleware',
 'debreach.middleware.RandomCommentMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'horizon.middleware.OperationLogMiddleware',
 'horizon.middleware.SimultaneousSessionsMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'horizon.themes.ThemeMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'openstack_dashboard.contrib.developer.profiler.middleware.ProfilerClientMiddleware',
 'openstack_dashboard.contrib.developer.profiler.middleware.ProfilerMiddleware')

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **ca...

Read more...

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Thank you; it appears that the exception handling here:

https://opendev.org/openstack/manila-ui/src/commit/497feb8e48750a2952cd5d3e1b03394d701311e1/manila_ui/dashboards/utils.py#L127

should include `UnicodeDecodeError`

I think that'd fix this issue.. there's nothing to encode/decode here if there are no hyphens in the name
Think we're missing some unit tests too that would have caught this.

Are you interested in attempting a fix, @sehun Jeong (sehun)?

Revision history for this message
sehun Jeong (sehun) wrote :

I'm interested to fix it.
thx!

sehun Jeong (sehun)
Changed in manila-ui:
assignee: nobody → sehun Jeong (sehun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila-ui/+/901319

Changed in manila-ui:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/manila-ui/+/901320

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila-ui (master)

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/901319
Committed: https://opendev.org/openstack/manila-ui/commit/e1b7aceff9f59333b2da6ad8933f50f11f16b086
Submitter: "Zuul (22348)"
Branch: master

commit e1b7aceff9f59333b2da6ad8933f50f11f16b086
Author: sehun.jeong <email address hidden>
Date: Tue Nov 21 15:49:11 2023 +0900

    Avoid server error caused by UnicodeDecodeError

    Sometimes b32decode may generate data which can't be decoded.
    Ignore UnicodeDecodeError so that a few other formats can be tried.

    Closes-bug: #2043572
    Change-Id: I5d978e8eb3931a218b1946625baa28aa23890cd6

Changed in manila-ui:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/manila-ui/+/903153

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila-ui (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/903153
Committed: https://opendev.org/openstack/manila-ui/commit/d28c06a52551206f194aaeadcc5fb861b5c2cf53
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit d28c06a52551206f194aaeadcc5fb861b5c2cf53
Author: sehun.jeong <email address hidden>
Date: Tue Nov 21 15:49:11 2023 +0900

    Avoid server error caused by UnicodeDecodeError

    Sometimes b32decode may generate data which can't be decoded.
    Ignore UnicodeDecodeError so that a few other formats can be tried.

    Closes-bug: #2043572
    Change-Id: I5d978e8eb3931a218b1946625baa28aa23890cd6
    (cherry picked from commit e1b7aceff9f59333b2da6ad8933f50f11f16b086)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/manila-ui/+/903154

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila-ui (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/903154
Committed: https://opendev.org/openstack/manila-ui/commit/ea689f5a668219e806e676790e1873add53a3d2b
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit ea689f5a668219e806e676790e1873add53a3d2b
Author: sehun.jeong <email address hidden>
Date: Tue Nov 21 15:49:11 2023 +0900

    Avoid server error caused by UnicodeDecodeError

    Sometimes b32decode may generate data which can't be decoded.
    Ignore UnicodeDecodeError so that a few other formats can be tried.

    Closes-bug: #2043572
    Change-Id: I5d978e8eb3931a218b1946625baa28aa23890cd6
    (cherry picked from commit e1b7aceff9f59333b2da6ad8933f50f11f16b086)
    (cherry picked from commit d28c06a52551206f194aaeadcc5fb861b5c2cf53)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila-ui (stable/2023.1)

Change abandoned by "Goutham Pacha Ravi <email address hidden>" on branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/manila-ui/+/901320
Reason: Merged as https://review.opendev.org/c/openstack/manila-ui/+/903154

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila-ui 11.0.0.0rc1

This issue was fixed in the openstack/manila-ui 11.0.0.0rc1 release candidate.

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.