Browse Source

Allow overrides in non global ceph.conf sections

In current ceph-base version there is a CephConfigOverride
parameter which allows to override ceph.conf params in global
section only.

This change will permit overrides to specify the ceph.conf
section into which they apply, while retaining backward
compatiblity.

Also adds in scenarios 001 and 004 some test cases.

Co-Authored-By: Giulio Fidente <gfidente@redhat.com>
Change-Id: Icaba7a58f458d853912d038f24c0cb4f853e0166
Implements: blueprint ceph-config-overrides
changes/61/658161/10
fpantano 2 years ago
parent
commit
2501f4747c
No known key found for this signature in database GPG Key ID: 799868C47301D458
  1. 5
      ci/environments/scenario001-standalone.yaml
  2. 2
      ci/environments/scenario004-standalone.yaml
  3. 57
      deployment/ceph-ansible/ceph-base.yaml

5
ci/environments/scenario001-standalone.yaml

@ -126,3 +126,8 @@ parameter_defaults:
- tty5
- tty6
ContainerCli: podman
CephConfigOverrides:
global:
globalkey: globalvalue
osd:
osdkey: osdvalue

2
ci/environments/scenario004-standalone.yaml

@ -102,3 +102,5 @@ parameter_defaults:
- tty6
# Remove ContainerCli once this scenario is tested on CentOS8
ContainerCli: docker
CephConfigOverrides:
globalkey: globalvalue

57
deployment/ceph-ansible/ceph-base.yaml

@ -210,6 +210,10 @@ conditions:
equals:
- {get_param: CephAnsibleSkipTags}
- ''
ceph_config_overrides_with_sections:
yaql:
data: {get_param: CephConfigOverrides}
expression: $.data.keys().any(predicate => $ in ['global', 'mon', 'mgr', 'osd', 'mds', 'client'])
resources:
ContainerImageUrlParts:
@ -238,6 +242,29 @@ resources:
expression: $.data.rightSplit(':', 1)[1]
data: {get_param: ContainerCephDaemonImage}
DefaultCephConfigOverrides:
type: OS::Heat::Value
properties:
type: json
value:
global:
osd_pool_default_size: {get_param: CephPoolDefaultSize}
osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
osd_pool_default_pgp_num: {get_param: CephPoolDefaultPgNum}
rgw_keystone_api_version: 3
rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
rgw_keystone_accepted_roles: 'Member, admin'
rgw_keystone_accepted_admin_roles: ResellerAdmin
rgw_keystone_admin_domain: default
rgw_keystone_admin_project: service
rgw_keystone_admin_user: swift
rgw_keystone_admin_password: {get_param: SwiftPassword}
rgw_keystone_implicit_tenants: 'true'
rgw_keystone_revocation_interval: '0'
rgw_s3_auth_use_keystone: 'true'
rgw_swift_versioning_enabled: 'true'
rgw_swift_account_in_url: 'true'
CephBaseAnsibleVars:
type: OS::Heat::Value
properties:
@ -361,24 +388,18 @@ resources:
mode: "0600"
keys: *openstack_keys
ceph_conf_overrides:
global:
map_merge:
- osd_pool_default_size: {get_param: CephPoolDefaultSize}
osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
osd_pool_default_pgp_num: {get_param: CephPoolDefaultPgNum}
rgw_keystone_api_version: 3
rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
rgw_keystone_accepted_roles: 'Member, admin'
rgw_keystone_accepted_admin_roles: ResellerAdmin
rgw_keystone_admin_domain: default
rgw_keystone_admin_project: service
rgw_keystone_admin_user: swift
rgw_keystone_admin_password: {get_param: SwiftPassword}
rgw_keystone_implicit_tenants: 'true'
rgw_keystone_revocation_interval: '0'
rgw_s3_auth_use_keystone: 'true'
rgw_swift_versioning_enabled: 'true'
rgw_swift_account_in_url: 'true'
if:
- ceph_config_overrides_with_sections
- yaql:
data:
default:
map_merge:
- {get_attr: [DefaultCephConfigOverrides, value]}
overrides: {get_param: CephConfigOverrides}
expression: $.data.default.mergeWith($.data.overrides)
- global:
map_merge:
- {get_attr: [DefaultCephConfigOverrides, value, global]}
- {get_param: CephConfigOverrides}
ip_version:
if:

Loading…
Cancel
Save