Merge "Allow users to choose to flattern volumes"
This commit is contained in:
commit
8f2da55d5e
|
@ -39,3 +39,10 @@ options:
|
|||
type: string
|
||||
description: |
|
||||
Optionally specify an existing rbd pool that cinder should map to.
|
||||
rbd-flatten-volume-from-snapshot:
|
||||
default:
|
||||
type: boolean
|
||||
default: False
|
||||
description: |
|
||||
Flatten volumes created from snapshots to remove dependency from
|
||||
volume to snapshot. Supported on Queens+
|
||||
|
|
|
@ -68,5 +68,8 @@ class CephSubordinateContext(OSContextGenerator):
|
|||
|
||||
if CompareOpenStackReleases(os_codename) >= "queens":
|
||||
section[service].append(('rbd_exclusive_cinder_pool', True))
|
||||
section[service].append(
|
||||
('rbd_flatten_volume_from_snapshot',
|
||||
config('rbd-flatten-volume-from-snapshot')))
|
||||
|
||||
return {'cinder': {'/etc/cinder/cinder.conf': {'sections': section}}}
|
||||
|
|
|
@ -365,6 +365,8 @@ class CinderCephBasicDeployment(OpenStackAmuletDeployment):
|
|||
if self._get_openstack_release() >= self.xenial_queens:
|
||||
section = sub_dict['cinder']["/etc/cinder/cinder.conf"]["sections"]
|
||||
section["cinder-ceph"].append(('rbd_exclusive_cinder_pool', True))
|
||||
section["cinder-ceph"].append(
|
||||
('rbd_flatten_volume_from_snapshot', False))
|
||||
|
||||
expected = {
|
||||
'subordinate_configuration': json.dumps(sub_dict),
|
||||
|
|
|
@ -108,7 +108,8 @@ class TestCinderContext(CharmTestCase):
|
|||
('rbd_ceph_conf',
|
||||
'/var/lib/charm/mycinder/ceph.conf'),
|
||||
('report_discard_supported', True),
|
||||
('rbd_exclusive_cinder_pool', True)
|
||||
('rbd_exclusive_cinder_pool', True),
|
||||
('rbd_flatten_volume_from_snapshot', False)
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue