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

Bug 1387467

Summary: glance image-create owner option not working
Product: Red Hat OpenStack Reporter: Faiaz Ahmed <fahmed>
Component: openstack-glanceAssignee: Cyril Roelandt <cyril>
Status: CLOSED ERRATA QA Contact: Avi Avraham <aavraham>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0 (Liberty)CC: cyril, egafford, eglynn, fpercoco, jschluet, pgrist, scohen, srevivo
Target Milestone: asyncKeywords: Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-glance-11.0.1-6.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-21 16:42:21 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:

Description Faiaz Ahmed 2016-10-21 00:55:17 UTC
Description of problem:
This is similar to the BZ https://bugzilla.redhat.com/show_bug.cgi?id=1087050

Though, this is working on OSP7

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
# glance image-create --name cirros-owner-test --disk-format qcow2  --container-format bare --file ./cirros-0.3.4-x86_64-disk.img --owner admin
403 Forbidden: Attribute 'owner' is reserved. (HTTP 403)

Additional info:
As per the CLI DOC, 8.4.2. glance image-create (v2) "Owner" option still exists. 

~~~~~~~~~~
--owner <OWNER>
    Owner of the image 
~~~~~~~~~~

https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/single/command-line-interface-reference/#glanceclient_subcommand_image-create_v2,

Comment 3 Cyril Roelandt 2016-11-02 16:08:02 UTC
So, the reason why it works in OSP7 is because v1 was the default back then.

I think backporting https://git.openstack.org/cgit/openstack/glance/commit/?id=d384d4c5b1f69785214a95ef65aaf1c081ca697a would be enough. Unless you have a simple workaround, I'll try that.

Comment 8 Avi Avraham 2016-12-05 11:23:47 UTC
verified
[root@undercloud-0 ~]# rpm -qa openstack-glance
openstack-glance-11.0.1-6.el7ost.noarch
glance image-create --name cirros-owner-test3 --disk-format qcow2  --container-format bare --file ./cirros-0.3.4-x86_64-disk.img --owner admin 
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | ee1eca47dc88f4879d8a229cc70a07c6     |
| container_format | bare                                 |
| created_at       | 2016-12-05T11:22:20.000000           |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 61afefb0-a69c-410c-83da-1cff95319884 |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros-owner-test3                   |
| owner            | admin                                |
| protected        | False                                |
| size             | 13287936                             |
| status           | active                               |
| updated_at       | 2016-12-05T11:22:21.000000           |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

Comment 10 errata-xmlrpc 2016-12-21 16:42:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2991.html