From: Giulio Fidente Date: Mon, 2 Oct 2017 12:10:53 +0000 (+0200) Subject: Update CephPools format in the docker templates to fit ceph-ansible X-Git-Tag: opnfv-6.0.0~44^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=f0bd09dc2807d1d1edcfd9a3d87c6ba8c70e2267;p=apex-tripleo-heat-templates.git Update CephPools format in the docker templates to fit ceph-ansible The format which ceph-ansible uses to describe the list of pools to be created in the cluster is different from the one which puppet-ceph uses; this commit updates the description and the the docker templates accordingly. Change-Id: I1e5b2c3cbf6ae02c19a2275ca119fed6e173319d Closes-Bug: #1720373 (cherry picked from commit c10aa7a0439fb7d8e8e964e75d73f3cbb54aa9ec) --- diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml index 8cc81fb0..4674ec14 100644 --- a/docker/services/ceph-ansible/ceph-base.yaml +++ b/docker/services/ceph-ansible/ceph-base.yaml @@ -73,15 +73,9 @@ parameters: description: > It can be used to override settings for one of the predefined pools, or to create additional ones. Example: - { - "volumes": { - "size": 5, - "pg_num": 128, - "pgp_num": 128 - } - } - default: {} - type: json + [{"name": "volumes", "pg_num": 64, "rule_name": ""}] + default: [] + type: comma_delimited_list CinderRbdPoolName: default: volumes type: string @@ -225,13 +219,7 @@ outputs: - {get_param: NovaRbdPoolName} - {get_param: GlanceRbdPoolName} - {get_param: GnocchiRbdPoolName} - - repeat: - template: - name: <%pool%> - pg_num: {get_param: CephPoolDefaultPgNum} - rule_name: "" - for_each: - <%pool%>: {get_param: CephPools} + - {get_param: CephPools} openstack_keys: &openstack_keys - name: list_join: diff --git a/releasenotes/notes/ceph-pools-with-ceph-ansible-f82425e585f90ef6.yaml b/releasenotes/notes/ceph-pools-with-ceph-ansible-f82425e585f90ef6.yaml new file mode 100644 index 00000000..63e6f212 --- /dev/null +++ b/releasenotes/notes/ceph-pools-with-ceph-ansible-f82425e585f90ef6.yaml @@ -0,0 +1,17 @@ +--- +upgrade: + - | + The format to use for the CephPools parameter needs to be updated into the + form expected by ceph-ansible. For example, for a new pool named `mypool` + it should change from: + { "mypool": { "size": 3, "pg_num": 128, "pgp_num": 128 } } + into: + [ { "name": "mypool", "pg_num": 128, "rule_name": "" } ] + The first is a map where each key is a pool name and its value the pool + properties, the second is a list where each item describes all properties + of a pool, including its name. +other: + - | + With the migration from puppet-ceph to ceph-ansible for the deployment + of Ceph, the format of CephPools parameter changes because the two tools + use a different format to represent the list of additional pools to create. diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index c3229621..76f856db 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -46,7 +46,10 @@ OPTIONAL_DOCKER_PUPPET_CONFIG_SECTIONS = [ 'puppet_tags', 'volumes' ] # consistency across files on. This should only contain parameters whose # definition we cannot change for backwards compatibility reasons. New # parameters to the templates should not be added to this list. -PARAMETER_DEFINITION_EXCLUSIONS = {'ManagementNetCidr': ['default'], +PARAMETER_DEFINITION_EXCLUSIONS = {'CephPools': ['description', + 'type', + 'default'], + 'ManagementNetCidr': ['default'], 'ManagementAllocationPools': ['default'], 'ExternalNetCidr': ['default'], 'ExternalAllocationPools': ['default'],