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:
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.
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.