Bug 1264769

Summary: set show_multiple_locations = true in glance configuration file
Product: Red Hat OpenStack Reporter: Yogev Rabl <yrabl>
Component: openstack-tripleo-heat-templatesAssignee: Giulio Fidente <gfidente>
Status: CLOSED ERRATA QA Contact: Yogev Rabl <yrabl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0 (Kilo)CC: fpercoco, jcoufal, jschluet, mburns, pgrist, rhel-osp-director-maint, tshefi
Target Milestone: rcKeywords: Triaged
Target Release: 10.0 (Newton)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-5.0.0-0.6.0rc3.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 15:16:04 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 Yogev Rabl 2015-09-21 07:35:34 UTC
Description of problem:
The parameter show_multiple_locations enables adding locations to images in glance. At the moment OSP Director sets the Glance configuration file according to default settings which set 
show_multiple_locations = false

Version-Release number of selected component (if applicable):
openstack-tripleo-0.0.7-0.1
openstack-tripleo-heat-templates-0.8.6-64
openstack-tripleo-puppet-elements-0.0.1-5

How reproducible:
100%

Steps to Reproduce:
1. Create an image 
2. Add a location to the image
# glance --os-image-api-version 2 location-add --url <url path> <image id>


Actual results:
the parameter show_multiple_locations is set to false by the OSP Director 
and when trying to add a location to an image an error massage says that administrator blocked this feature

Expected results:
the parameter is set as true. 
An additional location was added to the image

Comment 3 Emilien Macchi 2015-09-22 16:59:00 UTC
I have a doubt if we should enable the feature, it exposes some security risks.
https://github.com/openstack/glance/blob/master/glance/common/config.py#L119-L132

I would like some thoughts from Glance experts.

Comment 4 Flavio Percoco 2015-09-23 07:13:05 UTC
Enabling this feature by default is fine as long as the policies[0] are set to admin-only by default as well. Since I believe these policies should be set as admin-only by default, regardless, I think we should set them in OSPD and then we can enable this feature in the config file.

[0] https://github.com/openstack/glance/blob/master/etc/policy.json#L16-L18

Comment 6 Mike Burns 2016-04-07 20:50:54 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 10 Tzach Shefi 2016-11-13 08:34:06 UTC
Verified
Build openstack-tripleo-heat-templates-5.0.0-1.4.el7ost.noarch


[root@controller-0 ~]# grep -i show_multiple /etc/glance/glance-api.conf 
#       ``show_multiple_locations`` MUST be set to ``False``.
#     * show_multiple_locations
#show_multiple_locations = false
show_multiple_locations = True ----> good for us, it's a CEPH backend. 


#glance image-create --name cirros --disk-format qcow2 --container-format bare --file cirros-0.3.4-x86_64-disk.img 
....
                                             |
| locations        | [{"url": "rbd://babb8e64-a67b-                                                   |
|                  | 11e6-8819-525400b77709/images/337a1573-a775-4153-a883-4764f22245ac/snap",        |

Image-show also shows image location
# glance image-show 337a1573-a775-4153-a883-4764f22245ac

a1573-a775-4153-a883-4764f22245ac                                             |
| locations        | [{"url": "rbd://babb8e64-a67b-                                                   |
|                  | 11e6-8819-525400b77709/images/337a1573-a775-4153-a883-4764f22245ac/snap",        |

Comment 12 errata-xmlrpc 2016-12-14 15:16:04 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/RHEA-2016-2948.html