Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1087050

Summary: [glance] The API v2 reserved property error is not raised when there's nothing to update
Product: Red Hat OpenStack Reporter: Tzach Shefi <tshefi>
Component: python-glanceclientAssignee: CIndy Pallares <cpallare>
Status: CLOSED UPSTREAM QA Contact: Dafna Ron <dron>
Severity: low Docs Contact:
Priority: low    
Version: 5.0 (RHEL 7)CC: eglynn, fpercoco, jruzicka, sclewis, scohen, sgotliv, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-25 09:46:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Glance API log none

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.