@@ -51,6 +51,18 @@ GLANCE_STORE_ROOTWRAP_BASE_DIR=/usr/local/etc/glance
5151if is_opensuse; then
5252 GLANCE_STORE_ROOTWRAP_BASE_DIR=/usr/etc/glance
5353fi
54+ # When Cinder is used as a glance store, you can optionally configure cinder to
55+ # optimize bootable volume creation by allowing volumes to be cloned directly
56+ # in the backend instead of transferring data via Glance. To use this feature,
57+ # set CINDER_ALLOWED_DIRECT_URL_SCHEMES for cinder.conf and enable
58+ # GLANCE_SHOW_DIRECT_URL and/or GLANCE_SHOW_MULTIPLE_LOCATIONS for Glance. The
59+ # default value for both of these is False, because for some backends they
60+ # present a grave security risk (though not for Cinder, because all that's
61+ # exposed is the volume_id where the image data is stored.) See OSSN-0065 for
62+ # more information: https://wiki.openstack.org/wiki/OSSN/OSSN-0065
63+ GLANCE_SHOW_DIRECT_URL=$( trueorfalse False GLANCE_SHOW_DIRECT_URL)
64+ GLANCE_SHOW_MULTIPLE_LOCATIONS=$( trueorfalse False GLANCE_SHOW_MULTIPLE_LOCATIONS)
65+
5466# Glance multi-store configuration
5567# Boolean flag to enable multiple store configuration for glance
5668GLANCE_ENABLE_MULTIPLE_STORES=$( trueorfalse False GLANCE_ENABLE_MULTIPLE_STORES)
@@ -333,6 +345,9 @@ function configure_glance {
333345 if [ " $VIRT_DRIVER " = ' libvirt' ] && [ " $LIBVIRT_TYPE " = ' parallels' ]; then
334346 iniset $GLANCE_API_CONF DEFAULT disk_formats " ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,ploop"
335347 fi
348+ # Only use these if you know what you are doing! See OSSN-0065
349+ iniset $GLANCE_API_CONF DEFAULT show_image_direct_url $GLANCE_SHOW_DIRECT_URL
350+ iniset $GLANCE_API_CONF DEFAULT show_multiple_locations $GLANCE_SHOW_MULTIPLE_LOCATIONS
336351
337352 # Configure glance_store
338353 configure_glance_store $USE_CINDER_FOR_GLANCE $GLANCE_ENABLE_MULTIPLE_STORES
0 commit comments