Bug 1087050 - [glance] The API v2 reserved property error is not raised when there's nothing to update
Summary: [glance] The API v2 reserved property error is not raised when there's nothin...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-glanceclient
Version: 5.0 (RHEL 7)
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
: 5.0 (RHEL 7)
Assignee: CIndy Pallares
QA Contact: Dafna Ron
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-13 13:11 UTC by Tzach Shefi
Modified: 2016-04-26 18:56 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-25 09:46:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Glance API log (16.42 KB, text/plain)
2014-04-13 13:11 UTC, Tzach Shefi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1307412 0 None None None Never
OpenStack gerrit 185223 0 None None None Never

Internal Links: 1387467

Description Tzach Shefi 2014-04-13 13:11:20 UTC
Created attachment 885884 [details]
Glance API log

Description of problem:

Using V2 API fail to image-update <imageID> --owner<>, using V1 works fine. 


[root@orange-vdse ~(keystone_admin)]# glance --os-image-api-version 2 image-update 9969c805-c5e6-4d4b-b9e3-dd867a06be08 --owner 637ea20d137e4fa3bdbbb89ec513ef05Request returned failure status.
403 Forbidden
Attribute 'owner' is reserved.
    (HTTP 403)




Version-Release number of selected component (if applicable):
RHEL7
openstack-glance-2014.1-0.4.b3.el7.noarch


How reproducible:
Evertime

Note if you update using V1 and then run same update command same parameter value with V2, it will show as if update works.

Steps to Reproduce:
1. upload image
2. create new tenant 
3. V2 image-update <imageID> --ownder <newOwner>    will fail
 
4. If you run same update with V1 update will work.
5. Run same update as above (same values) with V2, it will work without error, see on step 3. Yes it didn't have to update anything but it didn't give error.

Actual results:

403 Forbidden
Attribute 'owner' is reserved.

Request returned failure status.
403 Forbidden
Attribute 'owner' is reserved.
    (HTTP 403)


Expected results:

Should update image's owner in this example.

Additional info:

Comment 1 Flavio Percoco 2014-04-14 09:57:02 UTC
Owner is a reserved property. It's not intended to be modified manually. Instead, the user should add new a new member to the image.

Comment 4 Flavio Percoco 2014-05-05 11:25:27 UTC
Turns out this is a glanceclient bug. The server would have raised a proper error if the client would've sent the `owner` change. However, the client currently checks whether a property P is actually being changed. If the property value remains unchanged, the client won't send it to the server, hence a proper error can't be raised.

I think this kind of should be in the server and it should be removed from the client.


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