expose image locations missing show_image_direct_url

Bug #1645703 reported by Alvaro Uria
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
glance (Juju Charms Collection)
Fix Released
Medium
Shane Peters

Bug Description

This sounds related to bug #1531813, which talked about "show_image_direct_url = True" in glance-api.conf. However, patch submitted only added "show_multiple_locations = True" (see http://bazaar.launchpad.net/~openstack-charmers-archive/charms/trusty/glance/next/revision/157).

According to http://docs.ceph.com/docs/master/rbd/rbd-openstack/#any-openstack-version-except-mitaka , show_image_direct_url is needed in both OpenStack versions before Mitaka, and in Mitaka.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hi Alvaro, if you look at the glance-api.conf template upstream you will see this:

# Whether to include the backend image storage location in image
# properties. Revealing storage location can be a security risk, so
# use this setting with caution! (boolean value)
#show_image_direct_url = false

# Whether to include the backend image locations in image properties.
# For example, if using the file system store a URL of
# "file:///path/to/image" will be returned to the user in the
# 'direct_url' meta-data field. Revealing storage location can be a
# security risk, so use this setting with caution! Setting this to
# true overrides the show_image_direct_url option. (boolean value)
#show_multiple_locations = false

So, if show_multiple_locations=True then show_image_direct_url is also True

Changed in glance (Juju Charms Collection):
status: New → Invalid
Revision history for this message
Billy Olsen (billy-olsen) wrote :

@Ed,

The comment reads it this way, but in reality specifying the show_image_direct_url forces the image properties to include the 'direct_url' field in the image response data and show_multiple_locations includes the 'locations' field. These checks are actually independent of one another [0], so the comment is wrong. It only applies to Mitaka because Nova implemented Glance v2 support in Newton - where it can use the locations property instead of just the direct_url image property.

As such, I'm fairly positive that the show_image_direct_url needs to be set to True as well. I'm doing a deployment to test this, but it should be a relatively trivial change.

[0] - https://github.com/openstack/glance/blob/stable/mitaka/glance/api/v2/images.py#L756

Revision history for this message
Alvaro Uria (aluria) wrote :

@wolsen, would you have any update on your tests? Please let me know if we should move the status to "Confirmed" or end the thread. Ceph documentation did not mention such override on show_image_direct_url.

Thank you both!

Changed in glance (Juju Charms Collection):
status: Invalid → Confirmed
importance: Undecided → Medium
assignee: nobody → Shane Peters (shaner)
milestone: none → 17.01
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/414317

Changed in glance (Juju Charms Collection):
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (master)

Reviewed: https://review.openstack.org/414317
Committed: https://git.openstack.org/cgit/openstack/charm-glance/commit/?id=92c06de6aac5be1f4d5481005d0ccf206e374a98
Submitter: Jenkins
Branch: master

commit 92c06de6aac5be1f4d5481005d0ccf206e374a98
Author: Shane Peters <email address hidden>
Date: Thu Dec 22 14:52:07 2016 -0500

    Set 'show_image_direct_url' in openstack >= kilo

    To expose the image location in the API for versions below Mitaka,
    show_image_direct_url should be set to True. For Mitaka specifically,
    show_multiple_locations should also be set.

    This change sets both of these values when show_multiple_locations is
    set in the charm.

    Change-Id: Ibb3b6ecd92834f6345d21801942da0d3466d5bdc
    Closes-Bug: #1645703

Changed in glance (Juju Charms Collection):
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (stable/16.10)

Fix proposed to branch: stable/16.10
Review: https://review.openstack.org/430321

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (stable/16.10)

Reviewed: https://review.openstack.org/430321
Committed: https://git.openstack.org/cgit/openstack/charm-glance/commit/?id=e9e7437b218a2d43ae5ec27366e6b7367ff6e807
Submitter: Jenkins
Branch: stable/16.10

commit e9e7437b218a2d43ae5ec27366e6b7367ff6e807
Author: Shane Peters <email address hidden>
Date: Thu Dec 22 14:52:07 2016 -0500

    Set 'show_image_direct_url' in openstack >= kilo

    To expose the image location in the API for versions below Mitaka,
    show_image_direct_url should be set to True. For Mitaka specifically,
    show_multiple_locations should also be set.

    This change sets both of these values when show_multiple_locations is
    set in the charm.

    Change-Id: Ibb3b6ecd92834f6345d21801942da0d3466d5bdc
    Closes-Bug: #1645703
    (cherry picked from commit 92c06de6aac5be1f4d5481005d0ccf206e374a98)

Revision history for this message
Billy Olsen (billy-olsen) wrote :
Changed in glance (Juju Charms Collection):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.