Expose image locations by default when in use with a Ceph backend to support copy-on-write cloning in cinder and nova
This commit is contained in:
parent
7743416bd4
commit
8a0023faa4
@ -255,3 +255,10 @@ options:
|
|||||||
wait for you to execute the openstack-upgrade action for this charm on
|
wait for you to execute the openstack-upgrade action for this charm on
|
||||||
each unit. If False it will revert to existing behavior of upgrading
|
each unit. If False it will revert to existing behavior of upgrading
|
||||||
all units on config change.
|
all units on config change.
|
||||||
|
expose-image-locations:
|
||||||
|
type: boolean
|
||||||
|
default: True
|
||||||
|
description: |
|
||||||
|
Expose underlying image locations via the API when using Ceph for image
|
||||||
|
storage. Only disable this option if you do not wish to use copy-on-write
|
||||||
|
clones of RAW format images with Ceph in Cinder and Nova.
|
||||||
|
@ -32,6 +32,7 @@ class CephGlanceContext(OSContextGenerator):
|
|||||||
# pool created based on service name.
|
# pool created based on service name.
|
||||||
'rbd_pool': service,
|
'rbd_pool': service,
|
||||||
'rbd_user': service,
|
'rbd_user': service,
|
||||||
|
'expose_image_locations': config('expose-image-locations')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ registry_host = {{ registry_host }}
|
|||||||
registry_port = 9191
|
registry_port = 9191
|
||||||
registry_client_protocol = http
|
registry_client_protocol = http
|
||||||
|
|
||||||
|
show_multiple_locations = {{ expose_image_locations }}
|
||||||
|
|
||||||
{% if api_config_flags -%}
|
{% if api_config_flags -%}
|
||||||
{% for key, value in api_config_flags.iteritems() -%}
|
{% for key, value in api_config_flags.iteritems() -%}
|
||||||
{{ key }} = {{ value }}
|
{{ key }} = {{ value }}
|
||||||
|
@ -42,10 +42,13 @@ class TestGlanceContexts(CharmTestCase):
|
|||||||
self.is_relation_made.return_value = True
|
self.is_relation_made.return_value = True
|
||||||
service = 'glance'
|
service = 'glance'
|
||||||
self.service_name.return_value = service
|
self.service_name.return_value = service
|
||||||
|
self.config.return_value = True
|
||||||
self.assertEquals(
|
self.assertEquals(
|
||||||
contexts.CephGlanceContext()(),
|
contexts.CephGlanceContext()(),
|
||||||
{'rbd_pool': service,
|
{'rbd_pool': service,
|
||||||
'rbd_user': service})
|
'rbd_user': service,
|
||||||
|
'expose_image_locations': True})
|
||||||
|
self.config.assert_called_with('expose-image-locations')
|
||||||
|
|
||||||
def test_multistore(self):
|
def test_multistore(self):
|
||||||
self.relation_ids.return_value = ['random_rid']
|
self.relation_ids.return_value = ['random_rid']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user