Unable to PATCH Metadata via horizon on Images Created with glance cli

Bug #1777834 reported by Rikimaru Honjo
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Unassigned

Bug Description

[Description about Error]
I created an image and tried to update "visibility" of the image.
As a result, updating was failed.

I could update "visibility" by openstack CLI and glance CLI.

So I think that this is a bug of horizon.

[Version]
I could reproduce this error at the following version.

* master(3696e8c32412e0f4cf4cf1ce21dbe8b0bf93afe0)
* 13.0.1(queens)

[Logs]

2018-06-20 08:59:35.510612 Unhandled exception in thread started by <function upload at 0x7f6be0992c80>
2018-06-20 08:59:35.510705 Traceback (most recent call last):
2018-06-20 08:59:35.510711 File "/opt/stack/horizon/openstack_dashboard/api/glance.py", line 547, in upload
2018-06-20 08:59:35.564607 filename = str(data.file.name)
2018-06-20 08:59:35.564708 AttributeError: '_io.BytesIO' object has no attribute 'name'
2018-06-20 08:59:46.887167 ERROR openstack_dashboard.api.rest.utils error invoking apiclient
2018-06-20 08:59:46.887212 Traceback (most recent call last):
2018-06-20 08:59:46.887215 File "/opt/stack/horizon/openstack_dashboard/api/rest/utils.py", line 127, in _wrapped
2018-06-20 08:59:46.887229 data = function(self, request, *args, **kw)
2018-06-20 08:59:46.887231 File "/opt/stack/horizon/openstack_dashboard/api/rest/glance.py", line 110, in patch
2018-06-20 08:59:46.887234 **request.DATA['updated']
2018-06-20 08:59:46.887235 KeyError: 'updated'

Revision history for this message
ezaspie03 (ezaspie03) wrote :

Reproduced issue in queens:

[Description about Error]
Attempted to update visibility, min_disk and min_ram, ran into the same issue. However this was only reproducible when the image was created via cli. When the image was created via horizon, min_disk and min_ram were successfully changed.

Suggest change of title to "Unable to Change Metadata via horizon on Images Created with glance cli"

[Version]
openstack 3.14.0

[Logs]
[Fri Jun 22 07:44:57.440084 2018] [wsgi:error] [pid 32292:tid 140226579207936] [remote 10.0.0.44:51717] ERROR openstack_dashboard.api.rest.utils error invoking apiclient
[Fri Jun 22 07:44:57.440123 2018] [wsgi:error] [pid 32292:tid 140226579207936] [remote 10.0.0.44:51717] Traceback (most recent call last):
[Fri Jun 22 07:44:57.440140 2018] [wsgi:error] [pid 32292:tid 140226579207936] [remote 10.0.0.44:51717] File "/usr/share/openstack-dashboard/openstack_dashboard/api/rest/utils.py", line 127, in _wrapped
[Fri Jun 22 07:44:57.440147 2018] [wsgi:error] [pid 32292:tid 140226579207936] [remote 10.0.0.44:51717] data = function(self, request, *args, **kw)
[Fri Jun 22 07:44:57.440154 2018] [wsgi:error] [pid 32292:tid 140226579207936] [remote 10.0.0.44:51717] File "/usr/share/openstack-dashboard/openstack_dashboard/api/rest/glance.py", line 110, in patch
[Fri Jun 22 07:44:57.440160 2018] [wsgi:error] [pid 32292:tid 140226579207936] [remote 10.0.0.44:51717] **request.DATA['updated']
[Fri Jun 22 07:44:57.440166 2018] [wsgi:error] [pid 32292:tid 140226579207936] [remote 10.0.0.44:51717] KeyError: 'updated'

ezaspie03 (ezaspie03)
summary: - Can't update image visibility
+ Unable to PATCH Metadata via horizon on Images Created with glance cli
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

I can't reproduce this bug on current master (Stein)

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Unfortunately, I didn't find a patch with fix

Changed in horizon:
status: New → Fix Committed
Revision history for this message
GUO Larry (larrygu) wrote :

I can confirm this issue on Openstack Queens when try to modify any image properties without metadata change.

# rpm -qa | grep -i horizon
puppet-horizon-12.4.0-1.el7.noarch
python-django-horizon-13.0.2-1.el7.noarch

2019-07-05 01:56:38,030 21836 ERROR openstack_dashboard.api.rest.utils error invoking apiclient
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/openstack_dashboard/api/rest/utils.py", line 130, in _wrapped
    data = function(self, request, *args, **kw)
  File "/usr/share/openstack-dashboard/openstack_dashboard/api/rest/glance.py", line 110, in patch
    **request.DATA['updated']
KeyError: 'updated'

Also I can confirm this issue is gone on Rocky and later release. Which fixed by this ticket: https://bugs.launchpad.net/horizon/+bug/1779879

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/queens)

Reviewed: https://review.opendev.org/669592
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ae1f4abd58f43911c6d8ff0490cb21ee658f6c1e
Submitter: Zuul
Branch: stable/queens

commit ae1f4abd58f43911c6d8ff0490cb21ee658f6c1e
Author: Vladislav Kuzmin <email address hidden>
Date: Tue Jul 3 18:30:09 2018 +0400

    Fix image description field

    Nothing changed when edit image description on Angularized panel.
    This patch fixes it.

    Change-Id: I29fb643bfa9b648ad24fcb9888c658a5a52e4bcc
    Closes-Bug: #1779879
    Closes-Bug: #1777834
    (cherry picked from commit 08e0f38c843816660e2b2930c7c6ee5c0435b4a3)

tags: added: in-stable-queens
Revision history for this message
Rikimaru Honjo (honjo-rikimaru-c6) wrote :

Thanks, my issue was solved by https://review.opendev.org/669592 !

I close this report.

Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.3

This issue was fixed in the openstack/horizon 13.0.3 release.

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.